-
Notifications
You must be signed in to change notification settings - Fork 511
Expand file tree
/
Copy pathbuild.gradle
More file actions
45 lines (40 loc) · 1.53 KB
/
build.gradle
File metadata and controls
45 lines (40 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
plugins {
// https://plugins.gradle.org/plugin/net.ltgt.apt
id 'net.ltgt.apt' version '0.21' // mapstruct
}
// See more details: https://github.com/tbroyer/gradle-apt-plugin#usage-with-ides
apply plugin: 'net.ltgt.apt-idea' // mapstruct
//apply plugin: 'net.ltgt.apt-eclipse' // Not needed with android studio
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.mapstructtest"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
compileOptions {
// Just here to demonstrate it compiles with this. Java 8 allows use of repeated annotations,
// See AutoValueMapper.java for more comments on this
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.android.support:appcompat-v7:28.0.0' // Just for this example
implementation 'org.mapstruct:mapstruct:1.3.0.Final'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.3.0.Final'
// If mappers generated in test code
// testAnnotationProcessor 'org.mapstruct:mapstruct-processor:1.3.0.Final'
// For tests of mapstruct with AutoValue
compileOnly "com.google.auto.value:auto-value:1.5.2"
annotationProcessor "com.google.auto.value:auto-value:1.5.2"
}