Compare commits
11 commits
Author | SHA1 | Date | |
---|---|---|---|
4dd96b7cdb | |||
d79f225325 | |||
a8ce2a04b8 | |||
ed5dd2110a | |||
6d8525c30c | |||
f6a1e7bc3d | |||
7357756667 | |||
2f974c46da | |||
854ea4e434 | |||
8d5ac54078 | |||
8ff8044982 |
9 changed files with 61 additions and 22 deletions
34
.github/workflows/bld.yml
vendored
34
.github/workflows/bld.yml
vendored
|
@ -5,17 +5,17 @@ on: [push, pull_request, workflow_dispatch]
|
|||
env:
|
||||
BITLY_ACCESS_TOKEN: ${{ secrets.BITLY_ACCESS_TOKEN }}
|
||||
COVERAGE_JDK: "21"
|
||||
COVERAGE_KOTLIN: "2.0.0"
|
||||
KOTLIN_HOME: /usr/share/kotlinc
|
||||
COVERAGE_KOTLIN: "2.0.21"
|
||||
|
||||
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,26 @@ 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 examples]
|
||||
working-directory: examples/bld
|
||||
run: |
|
||||
./bld compile
|
||||
./bld run --args='https://erik.thauvin.net/ https://bit.ly/2PsNMAA'
|
||||
./bld run-retrieve
|
||||
./bld run-java --args='https://erik.thauvin.net/ https://bit.ly/2PsNMAA'
|
||||
|
||||
- name: Run examples [gradle examples]
|
||||
working-directory: examples/gradle
|
||||
if: matrix.java-version != '24'
|
||||
run: |
|
||||
./gradlew run --args='https://erik.thauvin.net/ https://bit.ly/2PsNMAA'
|
||||
./gradlew runRetrieve
|
||||
./gradlew runJava --args='https://erik.thauvin.net/ https://bit.ly/2PsNMAA'
|
||||
|
||||
- name: Download dependencies
|
||||
run: ./bld download
|
||||
|
||||
|
@ -40,11 +60,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 }}
|
||||
|
|
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">
|
||||
<option name="ADDITIONAL_TAGS" value="created" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="UsePropertyAccessSyntax" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
|
@ -1,5 +1,5 @@
|
|||
[](https://opensource.org/licenses/BSD-3-Clause)
|
||||
[](https://kotlinlang.org/)
|
||||
[](https://kotlinlang.org/)
|
||||
[](https://rife2.com/bld)
|
||||
[](https://github.com/ethauvin/bitly-shorten/releases/latest)
|
||||
[](https://central.sonatype.com/artifact/net.thauvin.erik/bitly-shorten)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -24,7 +24,7 @@ public class ExampleBuild extends BaseProject {
|
|||
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY);
|
||||
|
||||
scope(compile)
|
||||
.include(dependency("net.thauvin.erik:bitly-shorten:2.0.0"))
|
||||
.include(dependency("net.thauvin.erik:bitly-shorten:2.0.1-SNAPSHOT"))
|
||||
.include(dependency("org.json:json:20250107"));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
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"
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
@ -11,7 +11,7 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation("net.thauvin.erik:bitly-shorten:2.0.0")
|
||||
implementation("net.thauvin.erik:bitly-shorten:2.0.1-SNAPSHOT")
|
||||
implementation("org.json:json:20240303")
|
||||
}
|
||||
|
||||
|
|
|
@ -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-SNAPSHOT
|
||||
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
|
||||
|
|
8
pom.xml
8
pom.xml
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.thauvin.erik</groupId>
|
||||
<artifactId>bitly-shorten</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<version>2.0.1-SNAPSHOT</version>
|
||||
<name>bitly-shorten</name>
|
||||
<description>A simple implementation of the Bitly link shortening API v4</description>
|
||||
<url>https://github.com/ethauvin/bitly-shorten</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>
|
||||
|
|
|
@ -40,6 +40,7 @@ import rife.bld.extension.JacocoReportOperation;
|
|||
import rife.bld.extension.dokka.LoggingLevel;
|
||||
import rife.bld.extension.dokka.OutputFormat;
|
||||
import rife.bld.extension.dokka.SourceSet;
|
||||
import rife.bld.extension.kotlin.CompileOptions;
|
||||
import rife.bld.operations.exceptions.ExitStatusException;
|
||||
import rife.bld.publish.PomBuilder;
|
||||
import rife.bld.publish.PublishDeveloper;
|
||||
|
@ -50,6 +51,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;
|
||||
|
@ -61,7 +65,7 @@ public class BitlyShortenBuild extends Project {
|
|||
public BitlyShortenBuild() {
|
||||
pkg = "net.thauvin.erik";
|
||||
name = "bitly-shorten";
|
||||
version = version(2, 0, 0);
|
||||
version = version(2, 0, 1, "SNAPSHOT");
|
||||
|
||||
javaRelease = 11;
|
||||
downloadSources = true;
|
||||
|
@ -69,7 +73,7 @@ public class BitlyShortenBuild extends Project {
|
|||
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
|
||||
|
||||
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))
|
||||
|
@ -84,6 +88,7 @@ public class BitlyShortenBuild extends Project {
|
|||
.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.platform", "junit-platform-launcher", version(1, 12, 1)))
|
||||
.include(dependency("com.willowtreeapps.assertk", "assertk-jvm", version(0, 28, 1)));
|
||||
|
||||
publishOperation()
|
||||
|
@ -119,6 +124,16 @@ public class BitlyShortenBuild extends Project {
|
|||
}
|
||||
|
||||
public static void main(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 BitlyShortenBuild().start(args);
|
||||
}
|
||||
|
||||
|
@ -127,6 +142,7 @@ public class BitlyShortenBuild extends Project {
|
|||
public void compile() throws Exception {
|
||||
new CompileKotlinOperation()
|
||||
.fromProject(this)
|
||||
.compileOptions(new CompileOptions().verbose(true))
|
||||
.execute();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue