diff --git a/examples/src/bld/java/com/example/ExampleBuild.java b/examples/src/bld/java/com/example/ExampleBuild.java index 9338d1b..5a8bac6 100644 --- a/examples/src/bld/java/com/example/ExampleBuild.java +++ b/examples/src/bld/java/com/example/ExampleBuild.java @@ -1,7 +1,7 @@ package com.example; +import rife.bld.BaseProject; import rife.bld.BuildCommand; -import rife.bld.Project; import rife.bld.extension.CompileKotlinOperation; import rife.bld.extension.CompileKotlinOptions; import rife.bld.extension.dokka.DokkaOperation; @@ -19,9 +19,8 @@ import java.util.logging.Logger; import static rife.bld.dependencies.Repository.*; import static rife.bld.dependencies.Scope.compile; -import static rife.bld.dependencies.Scope.test; -public class ExampleBuild extends Project { +public class ExampleBuild extends BaseProject { public ExampleBuild() { pkg = "com.example"; name = "Example"; @@ -35,10 +34,8 @@ public class ExampleBuild extends Project { scope(compile) .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", version(1, 9, 20))); - scope(test) - .include(dependency("org.jetbrains.kotlin:kotlin-test-junit5:1.9.20")) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1))); + + testOperation().mainClass("com.example.ExampleTest"); } public static void main(String[] args) { diff --git a/examples/src/test/kotlin/com/example/ExampleTest.kt b/examples/src/test/kotlin/com/example/ExampleTest.kt index 6d8cf65..5fc94d4 100644 --- a/examples/src/test/kotlin/com/example/ExampleTest.kt +++ b/examples/src/test/kotlin/com/example/ExampleTest.kt @@ -1,11 +1,18 @@ package com.example -import kotlin.test.Test -import kotlin.test.assertEquals - class ExampleTest { - @Test fun verifyHello() { - assertEquals("Hello World!", Example().message) + if ("Hello World!" != Example().message) { + throw AssertionError() + } else { + println("Succeeded") + } + } + + companion object { + @JvmStatic + fun main(args: Array) { + ExampleTest().verifyHello() + } } } \ No newline at end of file diff --git a/src/main/java/rife/bld/extension/CompileKotlinOptions.java b/src/main/java/rife/bld/extension/CompileKotlinOptions.java index ff82c56..0be8e98 100644 --- a/src/main/java/rife/bld/extension/CompileKotlinOptions.java +++ b/src/main/java/rife/bld/extension/CompileKotlinOptions.java @@ -307,18 +307,6 @@ public class CompileKotlinOptions { return this; } - /** - * Specify the target version of the generated JVM bytecode. - * - * @param version the target version - * @return this class insance - * @see #jdkRelease(String) - */ - public CompileKotlinOptions jdkRelease(int version) { - jdkRelease_ = String.valueOf(version); - return this; - } - /** * Specify the target version of the generated JVM bytecode. * Possible values are 1.8, 9, 10, ..., 21. The default value is 1.8. @@ -331,18 +319,6 @@ public class CompileKotlinOptions { return this; } - /** - * Specify the target version of the generated JVM bytecode. - * - * @param target the target version - * @return this class instance - * @see #jvmTarget(String) - */ - public CompileKotlinOptions jvmTarget(int target) { - jvmTarget_ = String.valueOf(target); - return this; - } - /** * Enable verbose logging output which includes details of the compilation process. *