| import android.support.LibraryGroups |
| import android.support.LibraryVersions |
| import android.support.SupportLibraryExtension |
| apply plugin: android.support.SupportKotlinLibraryPlugin |
| |
| sourceSets { |
| test.java.srcDirs += 'src/tests/kotlin' |
| } |
| |
| // Temporary hack to stop AS to adding two guavas into test's classpath |
| configurations.all { |
| resolutionStrategy { |
| force libs.guava |
| } |
| } |
| |
| dependencies { |
| compile project(":lifecycle:common") |
| compile libs.kotlin.stdlib |
| compile libs.auto_common |
| compile libs.javapoet |
| testCompile libs.google_compile_testing |
| testCompile libs.jsr250 |
| testCompile files(org.gradle.internal.jvm.Jvm.current().getToolsJar()) |
| } |
| |
| version = LibraryVersions.LIFECYCLES_EXT.toString() |
| createKotlinCheckstyle(project) |
| |
| // we actually need to compile :lifecycle:common, but compileJava is easier |
| task compileTestLibrarySource(type: JavaCompile, dependsOn: compileJava) { |
| source "src/tests/test-data/lib/src" |
| classpath = project.compileJava.classpath |
| destinationDir = new File(project.buildDir, 'test-data/lib/classes') |
| } |
| |
| task jarTestLibrarySource(type: Jar, dependsOn: compileTestLibrarySource) { |
| from compileTestLibrarySource.destinationDir |
| archiveName = "test-library.jar" |
| destinationDir = file("src/tests/test-data/lib/") |
| } |
| |
| supportLibrary { |
| name = "Android Lifecycles Compiler" |
| publish = true |
| mavenGroup = LibraryGroups.LIFECYCLE |
| inceptionYear = "2017" |
| description = "Android Lifecycles annotation processor" |
| url = SupportLibraryExtension.ARCHITECTURE_URL |
| } |