Update SimpleKotlinGradleIT.kt tests to use new DSL.
^KT-45744 In Progress
This commit is contained in:
committed by
TeamCityServer
parent
aabb05104e
commit
9ef5817f8b
+160
-135
@@ -1,157 +1,182 @@
|
||||
package org.jetbrains.kotlin.gradle
|
||||
|
||||
import org.gradle.api.logging.LogLevel
|
||||
import org.gradle.api.logging.configuration.WarningMode
|
||||
import org.jetbrains.kotlin.gradle.util.modify
|
||||
import org.junit.Test
|
||||
import java.io.File
|
||||
import kotlin.test.assertTrue
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.gradle.testbase.*
|
||||
import org.junit.jupiter.api.DisplayName
|
||||
import org.junit.jupiter.api.Tag
|
||||
|
||||
class SimpleKotlinGradleIT : BaseGradleIT() {
|
||||
@Tag("JUnit5")
|
||||
@DisplayName("KGP simple tests")
|
||||
class SimpleKotlinGradleIT : KGPBaseTest() {
|
||||
|
||||
override fun defaultBuildOptions(): BuildOptions {
|
||||
return super.defaultBuildOptions().copy(warningMode = WarningMode.Summary)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testSimpleCompile() {
|
||||
val project = Project("simpleProject")
|
||||
|
||||
project.build("compileDeployKotlin", "build") {
|
||||
assertSuccessful()
|
||||
assertContains("Finished executing kotlin compiler using daemon strategy")
|
||||
assertTrue {
|
||||
fileInWorkingDir("build/reports/tests/classes/demo.TestSource.html").exists() ||
|
||||
fileInWorkingDir("build/reports/tests/test/classes/demo.TestSource.html").exists()
|
||||
@GradleTest
|
||||
@DisplayName("On second run common tasks should be up-to-date")
|
||||
fun testSimpleCompile(gradleVersion: GradleVersion) {
|
||||
project(
|
||||
projectName = "simpleProject",
|
||||
gradleVersion = gradleVersion,
|
||||
buildOptions = defaultBuildOptions.copy(logLevel = LogLevel.DEBUG),
|
||||
) {
|
||||
build("compileDeployKotlin", "build") {
|
||||
assertOutputContains("Finished executing kotlin compiler using daemon strategy")
|
||||
assertFileExists("build/reports/tests/test/classes/demo.TestSource.html")
|
||||
assertTasksExecuted(":compileKotlin", ":compileTestKotlin", ":compileDeployKotlin")
|
||||
}
|
||||
assertTasksExecuted(":compileKotlin", ":compileTestKotlin", ":compileDeployKotlin")
|
||||
}
|
||||
|
||||
project.build("compileDeployKotlin", "build") {
|
||||
assertSuccessful()
|
||||
assertTasksUpToDate(
|
||||
":compileKotlin",
|
||||
":compileTestKotlin",
|
||||
":compileDeployKotlin",
|
||||
":compileJava"
|
||||
build("compileDeployKotlin", "build") {
|
||||
assertTasksUpToDate(
|
||||
":compileKotlin",
|
||||
":compileTestKotlin",
|
||||
":compileDeployKotlin",
|
||||
":compileJava"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@DisplayName("Plugin allows to suppress all warnings")
|
||||
fun testSuppressWarnings(gradleVersion: GradleVersion) {
|
||||
project("suppressWarnings", gradleVersion) {
|
||||
build("build") {
|
||||
assertTasksExecuted(":compileKotlin")
|
||||
assertOutputDoesNotContain("""w: [^\r\n]*?\.kt""".toRegex())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@DisplayName("Plugin should allow to add custom Kotlin directory")
|
||||
fun testKotlinCustomDirectory(gradleVersion: GradleVersion) {
|
||||
project("customSrcDir", gradleVersion) {
|
||||
build("build")
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@DisplayName("Plugin should correctly handle additional java source directories")
|
||||
fun testKotlinExtraJavaSrc(gradleVersion: GradleVersion) {
|
||||
project("additionalJavaSrc", gradleVersion) {
|
||||
build("build")
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@DisplayName("Using newer language features with older api level should fail the build")
|
||||
fun testLanguageVersion(gradleVersion: GradleVersion) {
|
||||
project("languageVersion", gradleVersion) {
|
||||
buildAndFail("build") {
|
||||
assertOutputContains("'break' and 'continue' are not allowed in 'when' statements")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@DisplayName("Compilation should fail on unknown JVM target")
|
||||
fun testJvmTarget(gradleVersion: GradleVersion) {
|
||||
project("jvmTarget", gradleVersion) {
|
||||
buildAndFail("build") {
|
||||
assertOutputContains("Unknown JVM target version: 1.7")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@DisplayName("Should produce '.kotlin_module' file with specified name")
|
||||
fun testModuleName(gradleVersion: GradleVersion) {
|
||||
project("moduleName", gradleVersion) {
|
||||
build("build") {
|
||||
assertFileExists("build/classes/kotlin/main/META-INF/FLAG.kotlin_module")
|
||||
assertFileNotExists("build/classes/kotlin/main/META-INF/moduleName.kotlin_module")
|
||||
assertOutputDoesNotContain("Argument -module-name is passed multiple times")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@DisplayName("Should use custom JDK to compile sources")
|
||||
fun testCustomJdk(gradleVersion: GradleVersion) {
|
||||
project("customJdk", gradleVersion) {
|
||||
buildAndFail("build") {
|
||||
assertOutputContains("Unresolved reference: stream")
|
||||
assertOutputDoesNotContain("AutoCloseable")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@DisplayName("Compile task destination dir should be configured on configuration phase")
|
||||
fun testDestinationDirReferencedDuringEvaluation(gradleVersion: GradleVersion) {
|
||||
project("destinationDirReferencedDuringEvaluation", gradleVersion) {
|
||||
build("build") {
|
||||
assertOutputContains("foo.GreeterTest > testHelloWorld PASSED")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@DisplayName("Plugin correctly handle redefined build dir location")
|
||||
fun testBuildDirLazyEvaluation(gradleVersion: GradleVersion) {
|
||||
project("kotlinProject", gradleVersion) {
|
||||
// Change the build directory in the end of the build script:
|
||||
val customBuildDirName = "customBuild"
|
||||
appendToBuildFile(
|
||||
"buildDir = '$customBuildDirName'"
|
||||
)
|
||||
|
||||
build("build") {
|
||||
assertDirectoryExists("$customBuildDirName/classes")
|
||||
assertFileNotExists("build")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testSuppressWarnings() {
|
||||
val project = Project("suppressWarnings")
|
||||
|
||||
project.build("build") {
|
||||
assertSuccessful()
|
||||
assertTasksExecuted(":compileKotlin")
|
||||
assertNotContains("""w: [^\r\n]*?\.kt""".toRegex())
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testKotlinCustomDirectory() {
|
||||
Project("customSrcDir").build("build") {
|
||||
assertSuccessful()
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testKotlinExtraJavaSrc() {
|
||||
Project("additionalJavaSrc").build("build") {
|
||||
assertSuccessful()
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testLanguageVersion() {
|
||||
Project("languageVersion").build("build") {
|
||||
assertFailed()
|
||||
assertContains("'break' and 'continue' are not allowed in 'when' statements")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testJvmTarget() {
|
||||
Project("jvmTarget").build("build") {
|
||||
assertFailed()
|
||||
assertContains("Unknown JVM target version: 1.7")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testModuleName() {
|
||||
Project("moduleName").build("build") {
|
||||
assertSuccessful()
|
||||
assertFileExists("build/classes/kotlin/main/META-INF/FLAG.kotlin_module")
|
||||
assertNoSuchFile("build/classes/kotlin/main/META-INF/moduleName.kotlin_module")
|
||||
assertNotContains("Argument -module-name is passed multiple times")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCustomJdk() {
|
||||
Project("customJdk").build("build") {
|
||||
assertFailed()
|
||||
assertContains("Unresolved reference: stream")
|
||||
assertNotContains("AutoCloseable")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDestinationDirReferencedDuringEvaluation() {
|
||||
Project("destinationDirReferencedDuringEvaluation").build("build") {
|
||||
assertSuccessful()
|
||||
assertContains("GreeterTest PASSED")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testBuildDirLazyEvaluation() {
|
||||
val project = Project("kotlinProject")
|
||||
project.setupWorkingDir()
|
||||
|
||||
// Change the build directory in the end of the build script:
|
||||
val customBuildDirName = "customBuild"
|
||||
File(project.projectDir, "build.gradle").modify {
|
||||
it + "\nbuildDir = '$customBuildDirName'\n"
|
||||
}
|
||||
|
||||
project.build("build") {
|
||||
assertSuccessful()
|
||||
assertFileExists("$customBuildDirName/classes")
|
||||
assertNoSuchFile("build")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testGroovyInterop() {
|
||||
Project("groovyInterop").build("build") {
|
||||
assertSuccessful()
|
||||
assertTasksExecuted(":test")
|
||||
assertContains("GroovyInteropTest PASSED")
|
||||
@GradleTest
|
||||
@DisplayName("Should correctly work with Groovy lang modules")
|
||||
fun testGroovyInterop(gradleVersion: GradleVersion) {
|
||||
project("groovyInterop", gradleVersion) {
|
||||
build("build") {
|
||||
assertTasksExecuted(":test")
|
||||
assertOutputContains("GroovyInteropTest > parametersInInnerClassConstructor PASSED")
|
||||
assertOutputContains("GroovyInteropTest > classWithReferenceToInner PASSED")
|
||||
assertOutputContains("GroovyInteropTest > groovyTraitAccessor PASSED")
|
||||
assertOutputContains("GroovyInteropTest > parametersInEnumConstructor PASSED")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Proguard corrupts RuntimeInvisibleParameterAnnotations/RuntimeVisibleParameterAnnotations tables:
|
||||
// https://sourceforge.net/p/proguard/bugs/735/
|
||||
// Gradle 7 compatibility issue: https://github.com/Guardsquare/proguard/issues/136
|
||||
@Test
|
||||
fun testInteropWithProguarded() {
|
||||
Project(
|
||||
projectName = "interopWithProguarded",
|
||||
gradleVersionRequirement = GradleVersionRequired.Until("6.8.4")
|
||||
).build("build") {
|
||||
assertSuccessful()
|
||||
assertTasksExecuted(":test")
|
||||
assertContains("InteropWithProguardedTest PASSED")
|
||||
@GradleTest
|
||||
@GradleTestVersions(maxVersion = "6.8.3")
|
||||
@DisplayName("Should correctly interop with ProGuard")
|
||||
fun testInteropWithProguarded(gradleVersion: GradleVersion) {
|
||||
project(
|
||||
"interopWithProguarded",
|
||||
gradleVersion,
|
||||
buildOptions = defaultBuildOptions.copy(warningMode = WarningMode.Summary)
|
||||
) {
|
||||
build("build") {
|
||||
assertTasksExecuted(":test")
|
||||
assertOutputContains("InteropWithProguardedTest > parametersInInnerKotlinClassConstructor PASSED")
|
||||
assertOutputContains("InteropWithProguardedTest > parametersInInnerJavaClassConstructor PASSED")
|
||||
assertOutputContains("InteropWithProguardedTest > parametersInJavaEnumConstructor PASSED")
|
||||
assertOutputContains("InteropWithProguardedTest > parametersInKotlinEnumConstructor PASSED")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testScalaInterop() {
|
||||
Project("scalaInterop").build("build") {
|
||||
assertTasksExecuted(":test")
|
||||
assertContains("ScalaInteropTest PASSED")
|
||||
assertSuccessful()
|
||||
@GradleTest
|
||||
@DisplayName("Should correctly work with Scala lang modules")
|
||||
fun testScalaInterop(gradleVersion: GradleVersion) {
|
||||
project("scalaInterop", gradleVersion) {
|
||||
build("build") {
|
||||
assertTasksExecuted(":test")
|
||||
assertOutputContains("ScalaInteropTest > parametersInInnerClassConstructor PASSED")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-12
@@ -1,16 +1,8 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id 'java'
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
apply plugin: 'java'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
@@ -27,7 +19,6 @@ sourceSets {
|
||||
dependencies {
|
||||
implementation 'com.google.guava:guava:12.0'
|
||||
testImplementation'org.testng:testng:6.8'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
+2
-14
@@ -1,15 +1,7 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
kotlin {
|
||||
@@ -23,10 +15,6 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.jdkHome = System.getenv("JDK_17")
|
||||
}
|
||||
|
||||
+2
-13
@@ -1,17 +1,7 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
}
|
||||
|
||||
|
||||
|
||||
apply plugin: "kotlin"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
kotlin {
|
||||
@@ -28,7 +18,6 @@ repositories {
|
||||
dependencies {
|
||||
implementation 'com.google.guava:guava:12.0'
|
||||
testImplementation'org.testng:testng:6.8'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
+9
-12
@@ -1,25 +1,22 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
id "java"
|
||||
}
|
||||
|
||||
apply plugin: "java"
|
||||
apply plugin: "kotlin"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
testImplementation'junit:junit:4.12'
|
||||
}
|
||||
|
||||
// important to test that destinationDir is configured before evaluation
|
||||
test.testClassesDirs = files(project.tasks.compileTestKotlin.destinationDir)
|
||||
|
||||
test {
|
||||
testLogging {
|
||||
info.events = ["passed", "failed"]
|
||||
}
|
||||
}
|
||||
+9
-12
@@ -1,23 +1,14 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
id "java"
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
apply plugin: "java"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||
testImplementation'junit:junit:4.12'
|
||||
implementation project(":lib")
|
||||
@@ -26,3 +17,9 @@ dependencies {
|
||||
compileKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
test {
|
||||
testLogging {
|
||||
info.events = ["passed", "failed"]
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,5 +1,7 @@
|
||||
apply plugin: "groovy"
|
||||
apply plugin: "java-library"
|
||||
plugins {
|
||||
id "groovy"
|
||||
id "java-library"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
+9
-12
@@ -1,23 +1,14 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
id "java"
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
apply plugin: "java"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||
testImplementation'junit:junit:4.12'
|
||||
implementation project(path: ":lib", configuration: "proguarded")
|
||||
@@ -26,3 +17,9 @@ dependencies {
|
||||
compileKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
test {
|
||||
testLogging {
|
||||
info.events = ["passed", "failed"]
|
||||
}
|
||||
}
|
||||
|
||||
+5
-10
@@ -1,17 +1,14 @@
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'net.sf.proguard:proguard-gradle:6.2.2'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "java"
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
@@ -50,5 +47,3 @@ artifacts {
|
||||
builtBy obfuscate
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-14
@@ -1,15 +1,7 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
kotlin {
|
||||
@@ -23,10 +15,6 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.jvmTarget = "1.7"
|
||||
}
|
||||
+2
-11
@@ -1,15 +1,7 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
@@ -18,7 +10,6 @@ repositories {
|
||||
dependencies {
|
||||
implementation 'com.google.guava:guava:12.0'
|
||||
testImplementation 'org.testng:testng:6.8'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// Required to be here until all tests using this project will migrate
|
||||
// to new DSL
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm" version "$kotlin_version"
|
||||
}
|
||||
}
|
||||
+2
-10
@@ -1,15 +1,7 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
|
||||
+2
-14
@@ -1,15 +1,7 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
kotlin {
|
||||
@@ -23,10 +15,6 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.moduleName = "FLAG"
|
||||
}
|
||||
|
||||
+9
-12
@@ -1,23 +1,14 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
id "java"
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
apply plugin: "java"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||
testImplementation'junit:junit:4.12'
|
||||
implementation project(":lib")
|
||||
@@ -26,3 +17,9 @@ dependencies {
|
||||
compileKotlin {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
test {
|
||||
testLogging {
|
||||
info.events = ["passed", "failed"]
|
||||
}
|
||||
}
|
||||
|
||||
+5
-3
@@ -1,10 +1,12 @@
|
||||
apply plugin: "java"
|
||||
apply plugin: "scala"
|
||||
plugins {
|
||||
id "java-library"
|
||||
id "scala"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.scala-lang:scala-library:2.12.7'
|
||||
api 'org.scala-lang:scala-library:2.12.7'
|
||||
}
|
||||
|
||||
+3
-11
@@ -1,16 +1,8 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
id "java"
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
apply plugin: 'java'
|
||||
|
||||
sourceSets {
|
||||
deploy
|
||||
}
|
||||
|
||||
+2
-16
@@ -1,17 +1,7 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.jvm"
|
||||
}
|
||||
|
||||
|
||||
|
||||
apply plugin: "kotlin"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
kotlin {
|
||||
@@ -20,10 +10,6 @@ sourceSets {
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
|
||||
Reference in New Issue
Block a user