diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index 436605a..8fafac9 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: java-version: [17, 21, 23] - kotlin-version: [1.9.24, 2.0.21, 2.1.0] + kotlin-version: [1.9.24, 2.0.21] steps: - name: Checkout source repository diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index 686fe3c..28c5833 100644 --- a/examples/lib/bld/bld-wrapper.properties +++ b/examples/lib/bld/bld-wrapper.properties @@ -1,7 +1,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= -bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.3 +bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.2 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= bld.version=2.1.0 diff --git a/examples/src/bld/java/com/example/ExampleBuild.java b/examples/src/bld/java/com/example/ExampleBuild.java index 83948b0..993767b 100644 --- a/examples/src/bld/java/com/example/ExampleBuild.java +++ b/examples/src/bld/java/com/example/ExampleBuild.java @@ -28,7 +28,7 @@ public class ExampleBuild extends Project { repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES); - final var kotlin = version(2, 1, 0); + final var kotlin = version(2, 0, 21); scope(compile) .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)); scope(test) @@ -58,11 +58,14 @@ public class ExampleBuild extends Project { @Override public void compile() throws Exception { // The source code located in src/main/kotlin and src/test/kotlin will be compiled - var op = new CompileKotlinOperation() + new CompileKotlinOperation() + .fromProject(this) // .kotlinHome("path/to/kotlin") // .kotlinc("path/to/kotlinc") - .fromProject(this); - op.compileOptions().verbose(true); - op.execute(); + .execute(); + +// var op = new CompileKotlinOperation().fromProject(this); +// op.compileOptions().verbose(true); +// op.execute(); } } diff --git a/scripts/checkcliargs.sh b/scripts/checkcliargs.sh index 30c8537..ef320da 100755 --- a/scripts/checkcliargs.sh +++ b/scripts/checkcliargs.sh @@ -4,7 +4,7 @@ new=/tmp/checkcliargs-new old=/tmp/checkcliargs-old kotlinc -h 2>$new -~/.sdkman/candidates/kotlin/2.1.0/bin/kotlinc -h 2>$old +~/.sdkman/candidates/kotlin/2.0.0/bin/kotlinc -h 2>$old code --diff --wait $old $new diff --git a/src/bld/java/rife/bld/extension/CompileKotlinOperationBuild.java b/src/bld/java/rife/bld/extension/CompileKotlinOperationBuild.java index 157d16e..6a84505 100644 --- a/src/bld/java/rife/bld/extension/CompileKotlinOperationBuild.java +++ b/src/bld/java/rife/bld/extension/CompileKotlinOperationBuild.java @@ -33,7 +33,7 @@ public class CompileKotlinOperationBuild extends Project { public CompileKotlinOperationBuild() { pkg = "rife.bld.extension"; name = "bld-kotlin"; - version = version(1, 0, 3); + version = version(1, 0, 3, "SNAPSHOT"); javaRelease = 17; diff --git a/src/main/java/rife/bld/extension/CompileKotlinOperation.java b/src/main/java/rife/bld/extension/CompileKotlinOperation.java index f2c0ecb..8143f5d 100644 --- a/src/main/java/rife/bld/extension/CompileKotlinOperation.java +++ b/src/main/java/rife/bld/extension/CompileKotlinOperation.java @@ -406,11 +406,9 @@ public class CompileKotlinOperation extends AbstractOperation args.add("-X" + it)); @@ -603,15 +597,6 @@ public class CompileOptions { return wError_; } - /** - * Indicates whether additional declaration, expression, and type compiler checks emit warnings. - * - * @return {@code true} or {@code false} - */ - public boolean isWExtra() { - return wExtra_; - } - /** * Generate metadata for Java 1.8 reflection on method parameters. * @@ -1086,15 +1071,4 @@ public class CompileOptions { wError_ = wError; return this; } - - /** - * Enable additional declaration, expression, and type compiler checks that emit warnings if {@code true}. - * - * @param wExtra {@code true} or {@code false} - * @return this operation instance - */ - public CompileOptions wExtra(boolean wExtra) { - wExtra_ = wExtra; - return this; - } } diff --git a/src/test/java/rife/bld/extension/kotlin/CompileOptionsTest.java b/src/test/java/rife/bld/extension/kotlin/CompileOptionsTest.java index 3bc9e25..129ab44 100644 --- a/src/test/java/rife/bld/extension/kotlin/CompileOptionsTest.java +++ b/src/test/java/rife/bld/extension/kotlin/CompileOptionsTest.java @@ -71,8 +71,7 @@ class CompileOptionsTest { .progressive(true) .scriptTemplates("name", "name2") .verbose(true) - .wError(true) - .wExtra(true); + .wError(true); var matches = List.of( "-api-version", "11", @@ -98,8 +97,7 @@ class CompileOptionsTest { "-progressive", "-script-templates", "name,name2", "-verbose", - "-Werror", - "-Wextra"); + "-Werror"); var args = new ArrayList>(); args.add(options.args()); @@ -236,8 +234,7 @@ class CompileOptionsTest { .progressive(true) .scriptTemplates("template") .verbose(true) - .wError(true) - .wExtra(true); + .wError(true); try (var softly = new AutoCloseableSoftAssertions()) { for (var p : args) { @@ -343,8 +340,7 @@ class CompileOptionsTest { .progressive(true) .scriptTemplates("name", "name2") .verbose(true) - .wError(true) - .wExtra(true); + .wError(true); try (var softly = new AutoCloseableSoftAssertions()) { softly.assertThat(options.advancedOptions()).containsExactly("xopt1", "xopt2"); @@ -372,7 +368,6 @@ class CompileOptionsTest { softly.assertThat(options.plugin()).containsExactly("id:name:value"); softly.assertThat(options.scriptTemplates()).containsExactly("name", "name2"); softly.assertThat(options.isWError()).isTrue(); - softly.assertThat(options.isWExtra()).isTrue(); } } } diff --git a/src/test/resources/kotlinc-args.txt b/src/test/resources/kotlinc-args.txt index e764231..b3c7f27 100644 --- a/src/test/resources/kotlinc-args.txt +++ b/src/test/resources/kotlinc-args.txt @@ -22,5 +22,4 @@ -script-templates -verbose -Werror --Wextra -X