testable-mock/demo/kotlin-demo/build.gradle.kts

34 lines
882 B
Plaintext
Raw Normal View History

2020-12-01 20:20:44 +08:00
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
2021-02-04 17:59:26 +08:00
kotlin("jvm") version "1.4.10"
2020-12-01 20:20:44 +08:00
}
group = "com.alibaba.testable"
version = "1.0.0-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
2021-02-04 17:59:26 +08:00
mavenCentral()
2020-12-01 20:20:44 +08:00
}
dependencies {
2021-02-04 17:59:26 +08:00
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
testImplementation("org.junit.jupiter:junit-jupiter:5.6.2")
2021-03-03 09:46:21 +08:00
testImplementation("com.alibaba.testable:testable-all:0.5.1")
testAnnotationProcessor("com.alibaba.testable:testable-processor:0.5.1")
2020-12-01 20:20:44 +08:00
}
tasks.withType<KotlinCompile> {
2021-02-04 17:59:26 +08:00
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
2020-12-01 20:20:44 +08:00
}
tasks.withType<Test> {
2021-02-04 17:59:26 +08:00
jvmArgs("-javaagent:${classpath.find { it.name.contains("testable-agent") }!!.absolutePath}")
useJUnitPlatform()
2020-12-01 20:20:44 +08:00
}