Updated dependencies

Bumped Gradle to version 8.10.1
Bumped Kotlin to version 2.0.20
Bumped bld to version 2.1.0
This commit is contained in:
Erik C. Thauvin 2024-09-09 11:33:38 -07:00
parent 94254cd590
commit 3b18ff1612
Signed by: erik
GPG key ID: 776702A6A2DA330E
32 changed files with 163 additions and 128 deletions

View file

@ -1,40 +1,41 @@
version: 2 version: 2.1
defaults: &defaults
working_directory: ~/repo
environment:
JVM_OPTS: -Xmx3200m
TERM: dumb
CI_NAME: "CircleCI"
defaults_bld: &defaults_bld commands:
build_and_test:
parameters:
reports-dir:
type: string
default: "build/reports/test_results"
steps: steps:
- checkout - checkout
- run: - run:
name: Download the dependencies name: Download dependencies
command: ./bld download command: ./bld download
- run: - run:
name: Run tests with bld name: Compile source
command: ./bld compile test command: ./bld compile
- run:
name: Run tests
command: ./bld jacoco -reports-dir=<< parameters.reports-dir >>
- store_test_results:
path: << parameters.reports-dir >>
- store_artifacts:
path: build/reports/jacoco/test/html
jobs: jobs:
bld_jdk21:
<<: *defaults
docker:
- image: cimg/openjdk:21.0
<<: *defaults_bld
bld_jdk17: bld_jdk17:
<<: *defaults
docker: docker:
- image: cimg/openjdk:17.0 - image: cimg/openjdk:17
steps:
- build_and_test
<<: *defaults_bld bld_jdk21:
docker:
- image: cimg/openjdk:21
steps:
- build_and_test
workflows: workflows:
version: 2
bld: bld:
jobs: jobs:
- bld_jdk17 - bld_jdk17

View file

@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
COVERAGE_SDK: "17" COVERAGE_JDK: "17"
strategy: strategy:
matrix: matrix:
@ -25,28 +25,28 @@ jobs:
distribution: "zulu" distribution: "zulu"
java-version: ${{ matrix.java-version }} java-version: ${{ matrix.java-version }}
- name: Grant execute permission for bld - name: Download dependencies
run: chmod +x bld
- name: Download the dependencies
run: ./bld download run: ./bld download
- name: Run tests with bld - name: Compile source
run: ./bld compile jacoco run: ./bld compile
- name: Run tests
run: ./bld jacoco
- name: Remove pom.xml - name: Remove pom.xml
if: success() && matrix.java-version == env.COVERAGE_SDK if: success() && matrix.java-version == env.COVERAGE_JDK
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_SDK if: success() && matrix.java-version == env.COVERAGE_JDK
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Upload coverage reports to Codecov - name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v3
if: success() && matrix.java-version == env.COVERAGE_SDK if: success() && matrix.java-version == env.COVERAGE_JDK
env: env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

6
.idea/bld.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BldConfiguration">
<events />
</component>
</project>

View file

@ -2,12 +2,12 @@
<library name="bld"> <library name="bld">
<CLASSES> <CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-1.9.1.jar!/" /> <root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-1.9.1-sources.jar!/" /> <root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0-sources.jar!/" />
</SOURCES> </SOURCES>
<excluded> <excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -9,9 +9,9 @@
<root url="file://$PROJECT_DIR$/lib/compile" /> <root url="file://$PROJECT_DIR$/lib/compile" />
<root url="file://$PROJECT_DIR$/lib/provided" /> <root url="file://$PROJECT_DIR$/lib/provided" />
</SOURCES> </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="true" type="SOURCES" />
</library> </library>
</component> </component>

View file

@ -8,7 +8,7 @@
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/runtime" /> <root url="file://$PROJECT_DIR$/lib/runtime" />
</SOURCES> </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
</library> </library>
</component> </component>

View file

@ -10,9 +10,9 @@
<root url="file://$PROJECT_DIR$/lib/test" /> <root url="file://$PROJECT_DIR$/lib/test" />
<root url="file://$PROJECT_DIR$/lib/provided" /> <root url="file://$PROJECT_DIR$/lib/provided" />
</SOURCES> </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="true" type="SOURCES" />
</library> </library>
</component> </component>

View file

@ -2,7 +2,7 @@
[![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause) [![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause)
[![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) [![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
[![bld](https://img.shields.io/badge/1.9.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) [![bld](https://img.shields.io/badge/2.1.0-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld)
[![release](https://img.shields.io/github/release/ethauvin/semver.svg)](https://github.com/ethauvin/semver/releases/latest) [![release](https://img.shields.io/github/release/ethauvin/semver.svg)](https://github.com/ethauvin/semver/releases/latest)
[![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/semver?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/semver/) [![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/semver?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/semver/)
[![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/semver.svg)](https://central.sonatype.com/artifact/net.thauvin.erik/semver) [![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/semver.svg)](https://central.sonatype.com/artifact/net.thauvin.erik/semver)
@ -297,7 +297,7 @@ dependencies {
kapt { kapt {
arguments { arguments {
arg("semver.project.dir", projectDir) arg("semver.project.dir", projectDir.absolutePath)
} }
} }
``` ```

View file

@ -5,6 +5,7 @@ lib/bld/**
!lib/bld/bld-wrapper.jar !lib/bld/bld-wrapper.jar
!lib/bld/bld-wrapper.properties !lib/bld/bld-wrapper.properties
lib/compile/ lib/compile/
lib/provided/
lib/runtime/ lib/runtime/
lib/standalone/ lib/standalone/
lib/test/ lib/test/

View file

@ -2,11 +2,12 @@
<library name="bld"> <library name="bld">
<CLASSES> <CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-1.9.1.jar!/" /> <root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<root url="jar://$USER_HOME$/.bld/dist/bld-1.9.1-sources.jar!/" /> <root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0-sources.jar!/" />
</SOURCES> </SOURCES>
<excluded> <excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -2,12 +2,16 @@
<library name="compile"> <library name="compile">
<CLASSES> <CLASSES>
<root url="file://$PROJECT_DIR$/lib/compile" /> <root url="file://$PROJECT_DIR$/lib/compile" />
<root url="file://$PROJECT_DIR$/lib/provided" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/compile" /> <root url="file://$PROJECT_DIR$/lib/compile" />
<root url="file://$PROJECT_DIR$/lib/provided" />
</SOURCES> </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="true" type="SOURCES" />
</library> </library>
</component> </component>

View file

@ -8,7 +8,7 @@
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/runtime" /> <root url="file://$PROJECT_DIR$/lib/runtime" />
</SOURCES> </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
</library> </library>
</component> </component>

View file

@ -2,13 +2,17 @@
<library name="test"> <library name="test">
<CLASSES> <CLASSES>
<root url="file://$PROJECT_DIR$/lib/test" /> <root url="file://$PROJECT_DIR$/lib/test" />
<root url="file://$PROJECT_DIR$/lib/provided" />
<root url="file://$PROJECT_DIR$/src/test/resources" /> <root url="file://$PROJECT_DIR$/src/test/resources" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/test" /> <root url="file://$PROJECT_DIR$/lib/test" />
<root url="file://$PROJECT_DIR$/lib/provided" />
</SOURCES> </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/provided" recursive="true" type="SOURCES" />
</library> </library>
</component> </component>

View file

@ -9,7 +9,7 @@
], ],
"java.configuration.updateBuildConfiguration": "automatic", "java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [ "java.project.referencedLibraries": [
"${HOME}/.bld/dist/bld-1.9.1.jar", "${HOME}/.bld/dist/bld-2.1.0.jar",
"lib/**/*.jar" "lib/**/*.jar"
] ]
} }

View file

@ -0,0 +1,10 @@
## Examples
To compile & run the examples:
```console
./bld compile
./bld run
./bld run-example
```

View file

@ -1,7 +1,7 @@
bld.downloadExtensionJavadoc=false bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true bld.downloadExtensionSources=true
bld.downloadLocation=
bld.extensions= bld.extensions=
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES
bld.downloadLocation=
bld.sourceDirectories= bld.sourceDirectories=
bld.version=1.9.1 bld.version=2.1.0

View file

@ -6,16 +6,12 @@ import rife.bld.Project;
import java.io.File; import java.io.File;
import java.util.List; import java.util.List;
import static rife.bld.dependencies.Repository.*; import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
import static rife.bld.dependencies.Scope.compile; import static rife.bld.dependencies.Repository.MAVEN_LOCAL;
import static rife.bld.dependencies.Scope.provided;
/** /**
* Example build. * Example build.
*
* <ul style="list-style-type:none">
* <li>./bld run</li>
* <li>./bld runExample</li>
* </ul>
*/ */
public class ExampleBuild extends Project { public class ExampleBuild extends Project {
public ExampleBuild() { public ExampleBuild() {
@ -29,7 +25,7 @@ public class ExampleBuild extends Project {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL); repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
scope(compile).include(dependency("net.thauvin.erik", "semver", version(1, 2, 2, "SNAPSHOT"))); scope(provided).include(dependency("net.thauvin.erik", "semver", version(1, 2, 2, "SNAPSHOT")));
} }
public static void main(String[] args) { public static void main(String[] args) {
@ -50,7 +46,7 @@ public class ExampleBuild extends Project {
super.compile(); super.compile();
} }
@BuildCommand(summary = "Run the example") @BuildCommand(value = "run-example", summary = "Runs the example")
public void runExample() throws Exception { public void runExample() throws Exception {
runOperation().fromProject(this).mainClass("com.example.Example").execute(); runOperation().fromProject(this).mainClass("com.example.Example").execute();
} }

View file

@ -6,8 +6,8 @@
<outputRelativeToContentRoot value="true" /> <outputRelativeToContentRoot value="true" />
<option name="semver.project.dir" value="$PROJECT_DIR$" /> <option name="semver.project.dir" value="$PROJECT_DIR$" />
<processorPath useClasspath="false"> <processorPath useClasspath="false">
<entry name="$MAVEN_REPOSITORY$/net/thauvin/erik/semver/1.2.2-SNAPSHOT/semver-1.2.2-SNAPSHOT.jar" /> <entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.thauvin.erik/semver/1.2.2-SNAPSHOT/31d53f3e9fdd226343234d13a080d6fd12b58ae6/semver-1.2.2-SNAPSHOT.jar" />
<entry name="$MAVEN_REPOSITORY$/com/github/spullara/mustache/java/compiler/0.9.12/compiler-0.9.12.jar" /> <entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.github.spullara.mustache.java/compiler/0.9.13/60666500a7dce7a5d3e17c09b46ea6f037192bd5/compiler-0.9.13.jar" />
</processorPath> </processorPath>
<module name="examples-java.main" /> <module name="examples-java.main" />
</profile> </profile>

View file

@ -0,0 +1,9 @@
## Examples
To run the examples:
```console
./gradlew run
./gradlew runExample
```

View file

@ -4,9 +4,6 @@ plugins {
id 'com.github.ben-manes.versions' version '0.51.0' id 'com.github.ben-manes.versions' version '0.51.0'
} }
// ./gradlew run
// ./gradlew runExample
defaultTasks 'run' defaultTasks 'run'
final def semverProcessor = 'net.thauvin.erik:semver:1.2.2-SNAPSHOT' final def semverProcessor = 'net.thauvin.erik:semver:1.2.2-SNAPSHOT'

View file

@ -5,6 +5,6 @@
<option name="sourceMapPrefix" /> <option name="sourceMapPrefix" />
</component> </component>
<component name="KotlinJpsPluginSettings"> <component name="KotlinJpsPluginSettings">
<option name="version" value="1.9.23" /> <option name="version" value="2.0.20" />
</component> </component>
</project> </project>

View file

@ -4,7 +4,7 @@
<component name="PDMPlugin"> <component name="PDMPlugin">
<option name="skipTestSources" value="false" /> <option name="skipTestSources" value="false" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="17" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/classes" /> <output url="file://$PROJECT_DIR$/classes" />
</component> </component>
</project> </project>

11
examples/kotlin/README.md Normal file
View file

@ -0,0 +1,11 @@
## Examples
To run the examples:
```console
./gradlew run
./gradlew runJava
./gradlew runExample
./gradlew runJavaExample
```

View file

@ -1,16 +1,10 @@
plugins { plugins {
id("application") id("application")
id("com.github.ben-manes.versions") version "0.51.0" id("com.github.ben-manes.versions") version "0.51.0"
kotlin("jvm") version "1.9.24" kotlin("jvm") version "2.0.20"
kotlin("kapt") version "1.9.23" kotlin("kapt") version "1.9.23"
} }
// ./gradlew
// ./gradlew run
// ./gradlew runJava
// ./gradlew runExample
// ./gradlew runJavaExample
defaultTasks(ApplicationPlugin.TASK_RUN_NAME) defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
val semverProcessor = "net.thauvin.erik:semver:1.2.2-SNAPSHOT" val semverProcessor = "net.thauvin.erik:semver:1.2.2-SNAPSHOT"
@ -24,7 +18,7 @@ dependencies {
kapt { kapt {
arguments { arguments {
arg("semver.project.dir", projectDir) arg("semver.project.dir", projectDir.absolutePath)
} }
} }

Binary file not shown.

View file

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View file

@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum

View file

@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################

Binary file not shown.

View file

@ -1,9 +1,9 @@
bld.downloadExtensionJavadoc=false bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true bld.downloadExtensionSources=true
bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.0
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.5
bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.9
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES,MAVEN_LOCAL,RIFE2_SNAPSHOTS
bld.downloadLocation= bld.downloadLocation=
bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.3
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.8
bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.5
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES,MAVEN_LOCAL,RIFE2_SNAPSHOTS
bld.sourceDirectories= bld.sourceDirectories=
bld.version=1.9.1 bld.version=2.1.0

View file

@ -40,8 +40,7 @@ import rife.bld.extension.PmdOperation;
import rife.bld.publish.*; import rife.bld.publish.*;
import rife.tools.exceptions.FileUtilsErrorException; import rife.tools.exceptions.FileUtilsErrorException;
import java.io.IOException; import java.io.File;
import java.nio.file.Path;
import java.util.List; import java.util.List;
import static rife.bld.dependencies.Repository.*; import static rife.bld.dependencies.Repository.*;
@ -71,10 +70,10 @@ public class SemverBuild extends Project {
repositories = List.of(MAVEN_CENTRAL, SONATYPE_SNAPSHOTS); repositories = List.of(MAVEN_CENTRAL, SONATYPE_SNAPSHOTS);
scope(compile) scope(compile)
.include(dependency("com.github.spullara.mustache.java", "compiler", version(0, 9, 13))); .include(dependency("com.github.spullara.mustache.java", "compiler", version(0, 9, 14)));
scope(test) scope(test)
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 2))) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 2))); .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0)));
javadocOperation().javadocOptions() javadocOperation().javadocOptions()
@ -86,6 +85,7 @@ public class SemverBuild extends Project {
.withCredentials(property("sonatype.user"), property("sonatype.password")) .withCredentials(property("sonatype.user"), property("sonatype.password"))
: repository(SONATYPE_RELEASES_LEGACY.location()) : repository(SONATYPE_RELEASES_LEGACY.location())
.withCredentials(property("sonatype.user"), property("sonatype.password"))) .withCredentials(property("sonatype.user"), property("sonatype.password")))
.repository(repository("github"))
.info(new PublishInfo() .info(new PublishInfo()
.groupId(pkg) .groupId(pkg)
.artifactId(name.toLowerCase()) .artifactId(name.toLowerCase())
@ -93,23 +93,19 @@ public class SemverBuild extends Project {
.version(version) .version(version)
.description(description) .description(description)
.url(url) .url(url)
.developer( .developer(new PublishDeveloper()
new PublishDeveloper()
.id("ethauvin") .id("ethauvin")
.name("Erik C. Thauvin") .name("Erik C. Thauvin")
.email("erik@thauvin.net") .email("erik@thauvin.net")
.url("https://erik.thauvin.net/") .url("https://erik.thauvin.net/")
) )
.license( .license(new PublishLicense()
new PublishLicense()
.name("The BSD 3-Clause License") .name("The BSD 3-Clause License")
.url("https://opensource.org/licenses/BSD-3-Clause") .url("https://opensource.org/licenses/BSD-3-Clause")
) )
.scm( .scm(new PublishScm()
new PublishScm()
.connection("scm:git:" + url + ".git") .connection("scm:git:" + url + ".git")
.developerConnection("scm:git:git@github.com:ethauvin/" + name.toLowerCase() .developerConnection("scm:git:git@github.com:ethauvin/" + name.toLowerCase() + ".git")
+ ".git")
.url(url) .url(url)
) )
.signKey(property("sign.key")) .signKey(property("sign.key"))
@ -121,7 +117,7 @@ public class SemverBuild extends Project {
} }
@BuildCommand(summary = "Generates JaCoCo Reports") @BuildCommand(summary = "Generates JaCoCo Reports")
public void jacoco() throws IOException { public void jacoco() throws Exception {
new JacocoReportOperation().fromProject(this).execute(); new JacocoReportOperation().fromProject(this).execute();
} }
@ -142,30 +138,30 @@ public class SemverBuild extends Project {
} }
@BuildCommand(summary = "Runs PMD analysis") @BuildCommand(summary = "Runs PMD analysis")
public void pmd() { public void pmd() throws Exception {
pmdOp.execute(); pmdOp.execute();
} }
@BuildCommand(value = "pmd-cli", summary = "Runs PMD analysis (CLI)") @BuildCommand(value = "pmd-cli", summary = "Runs PMD analysis (CLI)")
public void pmdCli() { public void pmdCli() throws Exception {
pmdOp.includeLineNumber(false).execute(); pmdOp.includeLineNumber(false).execute();
} }
@BuildCommand(value = "pom-root", summary = "Generates the POM file in the root directory")
public void pomRoot() throws FileUtilsErrorException {
PomBuilder.generateInto(publishOperation().fromProject(this).info(), dependencies(),
new File(workDirectory, "pom.xml"));
}
@Override @Override
public void publish() throws Exception { public void publish() throws Exception {
super.publish(); super.publish();
rootPom(); pomRoot();
} }
@Override @Override
public void publishLocal() throws Exception { public void publishLocal() throws Exception {
super.publishLocal(); super.publishLocal();
rootPom(); pomRoot();
}
@BuildCommand(value = "pom-root", summary = "Generates the POM file in the root directory")
public void rootPom() throws FileUtilsErrorException {
PomBuilder.generateInto(publishOperation().info(), dependencies(),
Path.of(workDirectory.getPath(), "pom.xml").toFile());
} }
} }