1: Add Dagger2 and Lombok to project
This commit is contained in:
16
build.gradle
16
build.gradle
@@ -1,5 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
|
id 'idea'
|
||||||
|
id "net.ltgt.apt" version "0.10"
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'com.bartek'
|
group 'com.bartek'
|
||||||
@@ -11,11 +13,25 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply from: 'dependency-versions.gradle'
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compile "com.google.dagger:dagger:${daggerVersion}"
|
||||||
|
apt "com.google.dagger:dagger-compiler:${daggerVersion}"
|
||||||
|
compileOnly "org.projectlombok:lombok:${lombokVersion}"
|
||||||
|
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes 'Main-Class': 'com.bartek.esa.EsaMain'
|
attributes 'Main-Class': 'com.bartek.esa.EsaMain'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FatJar
|
||||||
|
from {
|
||||||
|
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add generated classes to classpath
|
||||||
|
sourceSets.main.java.srcDirs = ['build/generated/source/apt/main','src/main/java']
|
||||||
|
|||||||
4
dependency-versions.gradle
Normal file
4
dependency-versions.gradle
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
ext {
|
||||||
|
daggerVersion = '2.21'
|
||||||
|
lombokVersion = '1.18.6'
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user