Compare commits
5 commits
3cac9171fd
...
1e5f088639
Author | SHA1 | Date | |
---|---|---|---|
1e5f088639 | |||
0ea3fd0520 | |||
28aebbabfa | |||
771e2fb208 | |||
53defaedb3 |
11 changed files with 77 additions and 18 deletions
38
.github/workflows/bld.yml
vendored
38
.github/workflows/bld.yml
vendored
|
@ -1,21 +1,21 @@
|
||||||
name: bld-ci
|
name: bld-ci
|
||||||
|
|
||||||
on: [push, pull_request, workflow_dispatch]
|
on: [ push, pull_request, workflow_dispatch ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
COVERAGE_JDK: "21"
|
COVERAGE_JDK: "21"
|
||||||
COVERAGE_KOTLIN: "2.0.0"
|
COVERAGE_KOTLIN: "2.1.20"
|
||||||
KOTLIN_HOME: /usr/share/kotlinc
|
|
||||||
PINBOARD_API_TOKEN: ${{ secrets.PINBOARD_API_TOKEN }}
|
PINBOARD_API_TOKEN: ${{ secrets.PINBOARD_API_TOKEN }}
|
||||||
|
|
||||||
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.1.20]
|
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
|
||||||
|
@ -29,6 +29,28 @@ jobs:
|
||||||
distribution: "zulu"
|
distribution: "zulu"
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
|
|
||||||
|
- name: Download dependencies [bld example]
|
||||||
|
working-directory: examples/bld
|
||||||
|
run: ./bld download
|
||||||
|
|
||||||
|
- name: Compile and run [bld examples]
|
||||||
|
working-directory: examples/bld
|
||||||
|
run: |
|
||||||
|
./bld compile run
|
||||||
|
./bld run-java
|
||||||
|
|
||||||
|
- name: Run example [gradle java example]
|
||||||
|
working-directory: examples/gradle/java
|
||||||
|
if: matrix.java-version != '24'
|
||||||
|
run: |
|
||||||
|
./gradlew run
|
||||||
|
|
||||||
|
- name: Run example [gradle kotlin example]
|
||||||
|
working-directory: examples/gradle/kotlin
|
||||||
|
if: matrix.java-version != '24'
|
||||||
|
run: |
|
||||||
|
./gradlew run
|
||||||
|
|
||||||
- name: Download dependencies
|
- name: Download dependencies
|
||||||
run: ./bld download
|
run: ./bld download
|
||||||
|
|
||||||
|
@ -40,11 +62,13 @@ jobs:
|
||||||
|
|
||||||
- name: Remove pom.xml
|
- name: Remove pom.xml
|
||||||
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN
|
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN
|
||||||
|
&& matrix.os == 'unbuntu-latest'
|
||||||
run: rm -rf pom.xml
|
run: rm -rf pom.xml
|
||||||
|
|
||||||
- name: SonarCloud Scan
|
- name: SonarCloud Scan
|
||||||
uses: sonarsource/sonarcloud-github-action@master
|
uses: sonarsource/sonarcloud-github-action@master
|
||||||
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN
|
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN
|
||||||
|
&& matrix.os == 'unbuntu-latest'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
|
1
.idea/inspectionProfiles/Project_Default.xml
generated
1
.idea/inspectionProfiles/Project_Default.xml
generated
|
@ -4,5 +4,6 @@
|
||||||
<inspection_tool class="JavadocDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
|
<inspection_tool class="JavadocDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
<option name="ADDITIONAL_TAGS" value="created" />
|
<option name="ADDITIONAL_TAGS" value="created" />
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
|
<inspection_tool class="UsePropertyAccessSyntax" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
</profile>
|
</profile>
|
||||||
</component>
|
</component>
|
6
examples/bld/.idea/bld.xml
generated
Normal file
6
examples/bld/.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>
|
|
@ -1,7 +1,7 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
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
|
||||||
|
|
|
@ -35,10 +35,9 @@ public class ExampleBuild extends BaseProject {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void compile() throws Exception {
|
public void compile() throws Exception {
|
||||||
var options = new CompileOptions().jvmOptions("--enable-native-access=ALL-UNNAMED");
|
|
||||||
new CompileKotlinOperation()
|
new CompileKotlinOperation()
|
||||||
.fromProject(this)
|
.fromProject(this)
|
||||||
.compileOptions(options)
|
.compileOptions(new CompileOptions().verbose(true))
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
// Also compile the Java source code
|
// Also compile the Java source code
|
||||||
|
|
|
@ -21,5 +21,5 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'net.thauvin.erik:pinboard-poster:1.2.0'
|
implementation 'net.thauvin.erik:pinboard-poster:1.2.1-SNAPSHOT'
|
||||||
}
|
}
|
||||||
|
|
9
examples/gradle/kotlin/.idea/kotlin.iml
generated
Normal file
9
examples/gradle/kotlin/.idea/kotlin.iml
generated
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
8
examples/gradle/kotlin/.idea/modules.xml
generated
Normal file
8
examples/gradle/kotlin/.idea/modules.xml
generated
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/kotlin.iml" filepath="$PROJECT_DIR$/.idea/kotlin.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -14,7 +14,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("net.thauvin.erik:pinboard-poster:1.2.0")
|
implementation("net.thauvin.erik:pinboard-poster:1.2.1-SNAPSHOT")
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
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.10-SNAPSHOT
|
||||||
bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.3
|
bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.4-SNAPSHOT
|
||||||
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.9
|
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.10-SNAPSHOT
|
||||||
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
|
||||||
|
|
|
@ -50,6 +50,9 @@ import rife.tools.exceptions.FileUtilsErrorException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.logging.ConsoleHandler;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -119,16 +122,25 @@ public class PinboardPosterBuild extends Project {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(final String[] args) {
|
public static void main(final String[] args) {
|
||||||
|
// Enable detailed logging for the extensions
|
||||||
|
var level = Level.ALL;
|
||||||
|
var logger = Logger.getLogger("rife.bld.extension");
|
||||||
|
var consoleHandler = new ConsoleHandler();
|
||||||
|
|
||||||
|
consoleHandler.setLevel(level);
|
||||||
|
logger.addHandler(consoleHandler);
|
||||||
|
logger.setLevel(level);
|
||||||
|
logger.setUseParentHandlers(false);
|
||||||
|
|
||||||
new PinboardPosterBuild().start(args);
|
new PinboardPosterBuild().start(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@BuildCommand(summary = "Compiles the Kotlin project")
|
@BuildCommand(summary = "Compiles the Kotlin project")
|
||||||
@Override
|
@Override
|
||||||
public void compile() throws Exception {
|
public void compile() throws Exception {
|
||||||
var options = new CompileOptions().jvmOptions("--enable-native-access=ALL-UNNAMED");
|
|
||||||
new CompileKotlinOperation()
|
new CompileKotlinOperation()
|
||||||
.fromProject(this)
|
.fromProject(this)
|
||||||
.compileOptions(options)
|
.compileOptions(new CompileOptions().verbose(true))
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue