Compare commits
No commits in common. "79bce706804ca1a6095c42a65bfa603825b3097b" and "f8e4354e35923df7a7e897536937bf4ba2a4eb92" have entirely different histories.
79bce70680
...
f8e4354e35
6 changed files with 10 additions and 26 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[](https://opensource.org/licenses/Apache-2.0)
|
[](https://opensource.org/licenses/Apache-2.0)
|
||||||
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
||||||
[](https://kotlinlang.org)
|
[](https://kotlinlang.org)
|
||||||
[](https://rife2.com/bld)
|
[](https://rife2.com/bld)
|
||||||
[](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-kotlin)
|
[](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-kotlin)
|
||||||
[](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-kotlin)
|
[](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-kotlin)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.6
|
bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.5
|
||||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class ExampleBuild extends Project {
|
||||||
|
|
||||||
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES);
|
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES);
|
||||||
|
|
||||||
final var kotlin = version(2, 0, 0);
|
final var kotlin = version(1, 9, 24);
|
||||||
scope(compile)
|
scope(compile)
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin));
|
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin));
|
||||||
scope(test)
|
scope(test)
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class CompileKotlinOperationBuild extends Project {
|
||||||
public CompileKotlinOperationBuild() {
|
public CompileKotlinOperationBuild() {
|
||||||
pkg = "rife.bld.extension";
|
pkg = "rife.bld.extension";
|
||||||
name = "bld-kotlin";
|
name = "bld-kotlin";
|
||||||
version = version(0, 9, 6);
|
version = version(0, 9, 5);
|
||||||
|
|
||||||
javaRelease = 17;
|
javaRelease = 17;
|
||||||
downloadSources = true;
|
downloadSources = true;
|
||||||
|
@ -41,7 +41,7 @@ public class CompileKotlinOperationBuild extends Project {
|
||||||
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES);
|
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES);
|
||||||
|
|
||||||
var dokka = version(1, 9, 20);
|
var dokka = version(1, 9, 20);
|
||||||
var kotlin = version(2, 0, 0);
|
var kotlin = version(1, 9, 24);
|
||||||
scope(compile)
|
scope(compile)
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-compiler", kotlin))
|
.include(dependency("org.jetbrains.kotlin", "kotlin-compiler", kotlin))
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-annotation-processing", kotlin))
|
.include(dependency("org.jetbrains.kotlin", "kotlin-annotation-processing", kotlin))
|
||||||
|
|
|
@ -65,17 +65,6 @@ public class CompileKotlinOptions {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Allow using declarations only from the specified version of Kotlin bundled libraries.
|
|
||||||
*
|
|
||||||
* @param version the api version
|
|
||||||
* @return this operation instance
|
|
||||||
*/
|
|
||||||
public CompileKotlinOptions apiVersion(int version) {
|
|
||||||
apiVersion_ = String.valueOf(version);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the compiler options from the given files.
|
* Read the compiler options from the given files.
|
||||||
* <p>
|
* <p>
|
||||||
|
|
|
@ -19,7 +19,6 @@ package rife.bld.extension;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
|
@ -55,7 +54,7 @@ class CompileKotlinOptionsTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void argsTest() {
|
void argsTest() {
|
||||||
var options = new CompileKotlinOptions()
|
var args = new CompileKotlinOptions()
|
||||||
.apiVersion("11")
|
.apiVersion("11")
|
||||||
.argFile("file.txt", "file2.txt")
|
.argFile("file.txt", "file2.txt")
|
||||||
.classpath("path1", "path2")
|
.classpath("path1", "path2")
|
||||||
|
@ -77,7 +76,8 @@ class CompileKotlinOptionsTest {
|
||||||
.progressive(true)
|
.progressive(true)
|
||||||
.scriptTemplates("name", "name2")
|
.scriptTemplates("name", "name2")
|
||||||
.verbose(true)
|
.verbose(true)
|
||||||
.wError(true);
|
.wError(true)
|
||||||
|
.args();
|
||||||
|
|
||||||
var matches = List.of(
|
var matches = List.of(
|
||||||
"-api-version", "11",
|
"-api-version", "11",
|
||||||
|
@ -105,13 +105,8 @@ class CompileKotlinOptionsTest {
|
||||||
"-verbose",
|
"-verbose",
|
||||||
"-Werror");
|
"-Werror");
|
||||||
|
|
||||||
var args = new ArrayList<List<String>>();
|
assertThat(args).hasSize(matches.size());
|
||||||
args.add(options.args());
|
|
||||||
args.add(options.apiVersion(11).jvmTarget(11).args());
|
|
||||||
|
|
||||||
for (var a: args) {
|
IntStream.range(0, args.size()).forEach(i -> assertThat(args.get(i)).isEqualTo(matches.get(i)));
|
||||||
assertThat(a).hasSize(matches.size());
|
|
||||||
IntStream.range(0, a.size()).forEach(i -> assertThat(a.get(i)).isEqualTo(matches.get(i)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue