diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index 949f84f..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.1 +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/src/bld/java/rife/bld/extension/CompileKotlinOperationBuild.java b/src/bld/java/rife/bld/extension/CompileKotlinOperationBuild.java index 885e968..d8b4782 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, 1); + version = version(1, 0, 2); javaRelease = 17; @@ -57,28 +57,26 @@ public class CompileKotlinOperationBuild extends Project { publishOperation() .repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2")) + .repository(repository("github")) .info() .groupId("com.uwyn.rife2") .artifactId("bld-kotlin") .description("bld Kotlin Extension") .url("https://github.com/rife2/bld-kotlin") - .developer( - new PublishDeveloper() - .id("ethauvin") - .name("Erik C. Thauvin") - .email("erik@thauvin.net") - .url("https://erik.thauvin.net/") + .developer(new PublishDeveloper() + .id("ethauvin") + .name("Erik C. Thauvin") + .email("erik@thauvin.net") + .url("https://erik.thauvin.net/") ) - .license( - new PublishLicense() - .name("The Apache License, Version 2.0") - .url("https://www.apache.org/licenses/LICENSE-2.0.txt") + .license(new PublishLicense() + .name("The Apache License, Version 2.0") + .url("https://www.apache.org/licenses/LICENSE-2.0.txt") ) - .scm( - new PublishScm() - .connection("scm:git:https://github.com/rife2/bld-kotlin.git") - .developerConnection("scm:git:git@github.com:rife2/bld-kotlin.git") - .url("https://github.com/rife2/bld-kotlin") + .scm(new PublishScm() + .connection("scm:git:https://github.com/rife2/bld-kotlin.git") + .developerConnection("scm:git:git@github.com:rife2/bld-kotlin.git") + .url("https://github.com/rife2/bld-kotlin") ) .signKey(property("sign.key")) .signPassphrase(property("sign.passphrase")); diff --git a/src/main/java/rife/bld/extension/CompileKotlinOperation.java b/src/main/java/rife/bld/extension/CompileKotlinOperation.java index af0bc45..8143f5d 100644 --- a/src/main/java/rife/bld/extension/CompileKotlinOperation.java +++ b/src/main/java/rife/bld/extension/CompileKotlinOperation.java @@ -284,8 +284,16 @@ public class CompileKotlinOperation extends AbstractOperation classpath, Collection sources, File destination, File friendPaths) throws ExitStatusException { - if (sources.isEmpty() || destination == null) { + if (sources.isEmpty()) { + if (!silent() && LOGGER.isLoggable(Level.WARNING)) { + LOGGER.warning("Nothing to compile."); + } return; + } else if (destination == null) { + if (!silent() && LOGGER.isLoggable(Level.SEVERE)) { + LOGGER.severe("No destination specified."); + } + throw new ExitStatusException(ExitStatusException.EXIT_FAILURE); } var args = new ArrayList(); @@ -294,8 +302,10 @@ public class CompileKotlinOperation extends AbstractOperation * Sets the following from the project: *
    - *
  • {@link #kotlinHome()} to the {@code KOTLIN_HOME} environment variable, if set.
  • - *
  • {@link #workDir()} to the project's directory.
  • + *
  • {@link #kotlinHome() kotlinHome} to the {@code KOTLIN_HOME} environment variable, if set.
  • + *
  • {@link #workDir() workDir} to the project's directory.
  • *
  • {@link #buildMainDirectory() buildMainDirectory}
  • *
  • {@link #buildTestDirectory() buildTestDirectory}
  • *
  • {@link #compileMainClasspath() compileMainClassPath}
  • *
  • {@link #compileTestClasspath() compilesTestClassPath}
  • - *
  • {@link #mainSourceDirectories()} () mainSourceDirectories} to the {@code kotlin} directory in - * {@link BaseProject#srcMainDirectory() srcMainDirectory}
  • + *
  • {@link #mainSourceDirectories() mainSourceDirectories} to the {@code kotlin} directory in + * {@link BaseProject#srcMainDirectory() srcMainDirectory}, if present.
  • *
  • {@link #testSourceDirectories() testSourceDirectories} to the {@code kotlin} directory in - * {@link BaseProject#srcTestDirectory() srcTestDirectory}
  • + * {@link BaseProject#srcTestDirectory() srcTestDirectory}, if present. *
  • {@link CompileOptions#jdkRelease jdkRelease} to {@link BaseProject#javaRelease() javaRelease}
  • *
  • {@link CompileOptions#noStdLib(boolean) noStdLib} to {@code true}
  • *
@@ -406,9 +416,17 @@ public class CompileKotlinOperation extends AbstractOperation