blob: 534d1ec127a2998ba6a4a4b08caeb0ba338ec83f [file] [log] [blame]
import static android.support.dependencies.DependenciesKt.*
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 GUAVA
}
}
dependencies {
compile(project(":lifecycle:common"))
compile(KOTLIN_STDLIB)
compile(AUTO_COMMON)
compile(JAVAPOET)
testCompile(GOOGLE_COMPILE_TESTING)
testCompile(JSR250)
testCompile files(org.gradle.internal.jvm.Jvm.current().getToolsJar())
}
// 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
mavenVersion = LibraryVersions.LIFECYCLES_EXT
mavenGroup = LibraryGroups.LIFECYCLE
inceptionYear = "2017"
description = "Android Lifecycles annotation processor"
url = SupportLibraryExtension.ARCHITECTURE_URL
}