Compare commits
3 commits
0efd5ab2fe
...
7d5b50641c
Author | SHA1 | Date | |
---|---|---|---|
7d5b50641c | |||
30f92d1262 | |||
8d4643d99a |
6 changed files with 33 additions and 14 deletions
20
.github/workflows/bld.yml
vendored
20
.github/workflows/bld.yml
vendored
|
@ -1,14 +1,16 @@
|
||||||
name: bld-ci
|
name: bld-ci
|
||||||
|
|
||||||
on: [push, pull_request, workflow_dispatch]
|
on: [ push, pull_request, workflow_dispatch ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-bld-project:
|
build-bld-project:
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java-version: [17, 21, 24]
|
java-version: [ 17, 21, 24 ]
|
||||||
|
kotlin-version: [ 1.9.25, 2.0.21, 2.1.20 ]
|
||||||
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
|
@ -22,12 +24,16 @@ jobs:
|
||||||
distribution: "zulu"
|
distribution: "zulu"
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
|
|
||||||
- name: Download dependencies
|
|
||||||
run: ./bld download
|
|
||||||
|
|
||||||
- name: Download dependencies [examples]
|
- name: Download dependencies [examples]
|
||||||
working-directory: examples
|
working-directory: examples
|
||||||
run: ./bld download
|
run: ./bld download
|
||||||
|
|
||||||
|
- name: Run tests [examples]
|
||||||
|
working-directory: examples
|
||||||
|
run: ./bld compile test
|
||||||
|
|
||||||
|
- name: Download dependencies
|
||||||
|
run: ./bld download
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: ./bld compile test
|
run: ./bld compile test
|
6
examples/.idea/bld.xml
generated
Normal file
6
examples/.idea/bld.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="BldConfiguration">
|
||||||
|
<events />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -2,7 +2,7 @@ bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.9
|
bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.9
|
||||||
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.4
|
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.1.0-SNAPSHOT
|
||||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
bld.version=2.2.1
|
bld.version=2.2.1
|
||||||
|
|
|
@ -31,7 +31,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, 1, 10);
|
final var kotlin = version(2, 1, 20);
|
||||||
scope(compile)
|
scope(compile)
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin));
|
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin));
|
||||||
scope(test)
|
scope(test)
|
||||||
|
|
|
@ -23,6 +23,7 @@ import rife.bld.publish.PublishLicense;
|
||||||
import rife.bld.publish.PublishScm;
|
import rife.bld.publish.PublishScm;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import static rife.bld.dependencies.Repository.*;
|
import static rife.bld.dependencies.Repository.*;
|
||||||
import static rife.bld.dependencies.Scope.compile;
|
import static rife.bld.dependencies.Scope.compile;
|
||||||
|
@ -97,10 +98,13 @@ public class DetektOperationBuild extends Project {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void test() throws Exception {
|
public void test() throws Exception {
|
||||||
|
var os = System.getProperty("os.name");
|
||||||
|
if (os != null && os.toLowerCase(Locale.US).contains("linux")) {
|
||||||
new ExecOperation()
|
new ExecOperation()
|
||||||
.fromProject(this)
|
.fromProject(this)
|
||||||
.command("scripts/cliargs.sh")
|
.command("scripts/cliargs.sh")
|
||||||
.execute();
|
.execute();
|
||||||
|
}
|
||||||
super.test();
|
super.test();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,8 @@ package rife.bld.extension;
|
||||||
import org.assertj.core.api.AutoCloseableSoftAssertions;
|
import org.assertj.core.api.AutoCloseableSoftAssertions;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.condition.EnabledOnOs;
|
||||||
|
import org.junit.jupiter.api.condition.OS;
|
||||||
import rife.bld.BaseProject;
|
import rife.bld.BaseProject;
|
||||||
import rife.bld.blueprints.BaseProjectBlueprint;
|
import rife.bld.blueprints.BaseProjectBlueprint;
|
||||||
import rife.bld.extension.detekt.Report;
|
import rife.bld.extension.detekt.Report;
|
||||||
|
@ -92,6 +94,7 @@ class DetektOperationTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@EnabledOnOs(OS.LINUX)
|
||||||
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
|
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
|
||||||
void testCheckAllParameters() throws IOException {
|
void testCheckAllParameters() throws IOException {
|
||||||
var args = Files.readAllLines(Paths.get("src", "test", "resources", "detekt-args.txt"));
|
var args = Files.readAllLines(Paths.get("src", "test", "resources", "detekt-args.txt"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue