Compare commits

..

18 commits

Author SHA1 Message Date
d2a623c0bb
Bump Gradle to version 8.14 2025-04-25 09:37:13 -07:00
5231ca7e11
Bump JaCoCo Report extension to version 0.9.10 2025-04-13 13:26:31 -07:00
eccccec67d
Bump JUnit to version 5.12.2 2025-04-13 13:25:55 -07:00
1c9a5191ce
Fix typo 2025-03-26 12:31:00 -07:00
a9cb103cdb
Add snapshot repository 2025-03-26 12:07:26 -07:00
1e5f088639
Cleanup compile command 2025-03-26 12:02:45 -07:00
0ea3fd0520
Add OS matrix for Ubuntu, Windows and macOS 2025-03-26 11:59:03 -07:00
28aebbabfa
IDEA project update 2025-03-26 11:58:46 -07:00
771e2fb208
Add extensions logging 2025-03-26 11:58:20 -07:00
53defaedb3
Update to latest snapshots 2025-03-26 11:57:29 -07:00
3cac9171fd
Add Kotlin example compile options for JDK 24 2025-03-20 21:36:17 -07:00
6510b2b6b3
Combine Kotlin compile options 2025-03-20 20:36:06 -07:00
f8cbab5e87
1.2.1-Add Kotlin compile options for JDK 24 2025-03-20 09:40:34 -07:00
221fa19b94
1.2.1-SNAPSHOT 2025-03-20 09:40:08 -07:00
12b4a80296
Bump Kotlin to version 2.1.20 2025-03-20 09:39:50 -07:00
f582a1e2c1
JDK 24 2025-03-18 23:56:56 -07:00
4b741538ad
Add Junit Platform Launcher dependency 2025-03-18 04:22:11 -07:00
fdb587c716
Update Java/Kotlin to more recent versions 2025-03-16 21:16:51 -07:00
22 changed files with 106 additions and 39 deletions

View file

@ -21,7 +21,7 @@ commands:
- sdkman/setup-sdkman
- sdkman/sdkman-install:
candidate: kotlin
version: 2.0.20
version: 2.1.10
- run:
name: Download dependencies
command: ./bld download
@ -46,11 +46,11 @@ jobs:
steps:
- build_and_test
bld_jdk20:
bld_jdk21:
<<: *defaults
docker:
- image: cimg/openjdk:20.0
- image: cimg/openjdk:21.0
steps:
- build_and_test
@ -59,4 +59,4 @@ workflows:
bld:
jobs:
- bld_jdk17
- bld_jdk20
- bld_jdk21

View file

@ -1,21 +1,21 @@
name: bld-ci
on: [push, pull_request, workflow_dispatch]
on: [ push, pull_request, workflow_dispatch ]
env:
COVERAGE_JDK: "21"
COVERAGE_KOTLIN: "2.0.0"
KOTLIN_HOME: /usr/share/kotlinc
COVERAGE_KOTLIN: "2.1.20"
PINBOARD_API_TOKEN: ${{ secrets.PINBOARD_API_TOKEN }}
jobs:
build-bld-project:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [17, 21, 23]
kotlin-version: [1.9.25, 2.1.10]
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:
- name: Checkout source repository
@ -29,6 +29,27 @@ jobs:
distribution: "zulu"
java-version: ${{ matrix.java-version }}
- name: Download dependencies [bld example]
working-directory: examples/bld
run: ./bld download
- name: Compile and run examples [bld example]
working-directory: examples/bld
run: |
./bld compile
./bld run
./bld run-java
- name: Run example [gradle java example]
working-directory: examples/gradle/java
run: |
./gradlew run
- name: Run example [gradle kotlin example]
working-directory: examples/gradle/kotlin
run: |
./gradlew run
- name: Download dependencies
run: ./bld download
@ -40,11 +61,13 @@ jobs:
- name: Remove pom.xml
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN
&& matrix.os == 'ubuntu-latest'
run: rm -rf pom.xml
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN
&& matrix.os == 'ubuntu-latest'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View file

@ -4,5 +4,6 @@
<inspection_tool class="JavadocDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ADDITIONAL_TAGS" value="created" />
</inspection_tool>
<inspection_tool class="UsePropertyAccessSyntax" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
</profile>
</component>

View file

@ -1,7 +1,7 @@
# [Pinboard](https://pinboard.in) Poster for Kotlin, Java and Android
[![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)
[![Kotlin](https://img.shields.io/badge/kotlin-2.1.10-7f52ff)](https://kotlinlang.org/)
[![Kotlin](https://img.shields.io/badge/kotlin-2.1.20-7f52ff)](https://kotlinlang.org/)
[![bld](https://img.shields.io/badge/2.2.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld)
[![Release](https://img.shields.io/github/release/ethauvin/pinboard-poster.svg)](https://github.com/ethauvin/pinboard-poster/releases/latest)
[![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/pinboard-poster.svg?color=blue)](https://central.sonatype.com/artifact/net.thauvin.erik/pinboard-poster)

6
examples/bld/.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

@ -1,7 +1,7 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
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.sourceDirectories=
bld.version=2.2.1

View file

@ -3,6 +3,7 @@ package net.thauvin.erik.pinboard.samples;
import rife.bld.BaseProject;
import rife.bld.BuildCommand;
import rife.bld.extension.CompileKotlinOperation;
import rife.bld.extension.kotlin.CompileOptions;
import rife.bld.operations.RunOperation;
import java.util.List;
@ -25,7 +26,7 @@ public class ExampleBuild extends BaseProject {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY);
scope(compile)
.include(dependency("net.thauvin.erik", "pinboard-poster", version(1, 2, 0)));
.include(dependency("net.thauvin.erik", "pinboard-poster", version(1, 2, 1, "SNAPSHOT")));
}
public static void main(String[] args) {
@ -36,6 +37,7 @@ public class ExampleBuild extends BaseProject {
public void compile() throws Exception {
new CompileKotlinOperation()
.fromProject(this)
.compileOptions(new CompileOptions().verbose(true))
.execute();
// Also compile the Java source code

View file

@ -18,8 +18,9 @@ java {
repositories {
mavenLocal()
mavenCentral()
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
}
dependencies {
implementation 'net.thauvin.erik:pinboard-poster:1.2.0'
implementation 'net.thauvin.erik:pinboard-poster:1.2.1-SNAPSHOT'
}

View file

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

View file

@ -114,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.

View file

@ -70,11 +70,11 @@ goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell

9
examples/gradle/kotlin/.idea/kotlin.iml generated Normal file
View 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>

View 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>

View file

@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("application")
id("com.github.ben-manes.versions") version "0.51.0"
kotlin("jvm") version "2.1.10"
kotlin("jvm") version "2.1.20"
}
defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
@ -11,10 +11,11 @@ defaultTasks(ApplicationPlugin.TASK_RUN_NAME)
repositories {
mavenLocal()
mavenCentral()
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
}
dependencies {
implementation("net.thauvin.erik:pinboard-poster:1.2.0")
implementation("net.thauvin.erik:pinboard-poster:1.2.1-SNAPSHOT")
}
java {

View file

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

View file

@ -114,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.

View file

@ -70,11 +70,11 @@ goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell

View file

@ -1,10 +1,10 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
bld.downloadLocation=
bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.9
bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.3
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.9
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.4
bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.10-SNAPSHOT
bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.4-SNAPSHOT
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.10
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.1.0-SNAPSHOT
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories=
bld.version=2.2.1

View file

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.thauvin.erik</groupId>
<artifactId>pinboard-poster</artifactId>
<version>1.2.0</version>
<version>1.2.1-SNAPSHOT</version>
<name>pinboard-poster</name>
<description>A small library for posting to Pinboard</description>
<url>https://github.com/ethauvin/pinboard-poster</url>
@ -18,19 +18,19 @@
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>2.1.10</version>
<version>2.1.20</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
<version>2.1.10</version>
<version>2.1.20</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>2.1.10</version>
<version>2.1.20</version>
<scope>compile</scope>
</dependency>
<dependency>

View file

@ -39,6 +39,7 @@ import rife.bld.extension.DokkaOperation;
import rife.bld.extension.JacocoReportOperation;
import rife.bld.extension.dokka.LoggingLevel;
import rife.bld.extension.dokka.OutputFormat;
import rife.bld.extension.kotlin.CompileOptions;
import rife.bld.operations.exceptions.ExitStatusException;
import rife.bld.publish.PomBuilder;
import rife.bld.publish.PublishDeveloper;
@ -49,6 +50,9 @@ import rife.tools.exceptions.FileUtilsErrorException;
import java.io.File;
import java.io.IOException;
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.Scope.compile;
@ -60,7 +64,7 @@ public class PinboardPosterBuild extends Project {
public PinboardPosterBuild() {
pkg = "net.thauvin.erik";
name = "pinboard-poster";
version = version(1, 2, 0);
version = version(1, 2, 1, "SNAPSHOT");
mainClass = pkg + ".PinboardPoster";
@ -70,7 +74,7 @@ public class PinboardPosterBuild extends Project {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
final var okHttp = version(4, 12, 0);
final var kotlin = version(2, 1, 10);
final var kotlin = version(2, 1, 20);
scope(compile)
// Kotlin
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin))
@ -81,8 +85,9 @@ public class PinboardPosterBuild extends Project {
.include(dependency("com.squareup.okhttp3", "logging-interceptor", okHttp));
scope(test)
.include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin))
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 1)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 1)));
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 2)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 2)))
.include(dependency("org.junit.platform", "junit-platform-launcher", version(1, 12, 2)));
publishOperation()
.repository(version.isSnapshot() ? repository(SONATYPE_SNAPSHOTS_LEGACY.location())
@ -117,6 +122,16 @@ public class PinboardPosterBuild extends Project {
}
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);
}
@ -125,6 +140,7 @@ public class PinboardPosterBuild extends Project {
public void compile() throws Exception {
new CompileKotlinOperation()
.fromProject(this)
.compileOptions(new CompileOptions().verbose(true))
.execute();
}