gradle: Factor out dagger apt code into its own file

This commit is contained in:
Torsten Grote
2018-11-01 10:45:59 -03:00
parent e1f31ad381
commit db8796049e
4 changed files with 17 additions and 45 deletions

View File

@@ -6,6 +6,7 @@ apply plugin: 'ru.vyarus.animalsniffer'
apply plugin: 'idea'
apply plugin: 'witness'
apply from: 'witness.gradle'
apply from: '../gradle/dagger.gradle'
dependencies {
implementation project(path: ':bramble-api', configuration: 'default')
@@ -32,21 +33,6 @@ dependencies {
signature 'org.codehaus.mojo.signature:java16:1.1@signature'
}
sourceSets.configureEach { sourceSet ->
tasks.named(sourceSet.compileJavaTaskName).configure {
options.annotationProcessorGeneratedSourcesDirectory = file("$buildDir/generated/source/apt/${sourceSet.name}")
}
}
idea {
module {
sourceDirs += compileJava.options.annotationProcessorGeneratedSourcesDirectory
generatedSourceDirs += compileJava.options.annotationProcessorGeneratedSourcesDirectory
testSourceDirs += compileTestJava.options.annotationProcessorGeneratedSourcesDirectory
generatedSourceDirs += compileTestJava.options.annotationProcessorGeneratedSourcesDirectory
}
}
// needed to make test output available to bramble-java
configurations {
testOutput.extendsFrom(testCompile)