diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
new file mode 100644
index 00000000..5f75aaaf
--- /dev/null
+++ b/.github/release-drafter.yml
@@ -0,0 +1,22 @@
+version-template: "$MAJOR.$MINOR"
+name-template: 'v$NEXT_MINOR_VERSION'
+tag-template: 'v$NEXT_MINOR_VERSION'
+categories:
+ - title: '🚀 Features'
+ labels:
+ - 'feature'
+ - 'enhancement'
+ - title: '🐛 Bug Fixes'
+ labels:
+ - 'fix'
+ - 'bugfix'
+ - 'bug'
+ - title: '🧰 Maintenance'
+ label: 'chore'
+ - title: '⬆️ Dependencies'
+ labels:
+ - 'dependencies'
+template: |
+ ## What's Changed
+
+ $CHANGES
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 5b312f6c..e290a52e 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -15,14 +15,15 @@ jobs:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 1.8
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v3
with:
- java-version: 1.8
+ distribution: 'temurin'
+ java-version: 8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml
new file mode 100644
index 00000000..fded9c81
--- /dev/null
+++ b/.github/workflows/release-drafter.yml
@@ -0,0 +1,22 @@
+name: Release Drafter
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ types: [opened, reopened, synchronize]
+
+permissions:
+ contents: read
+
+jobs:
+ update_release_draft:
+ permissions:
+ contents: write
+ pull-requests: read
+ runs-on: ubuntu-latest
+ steps:
+ - uses: release-drafter/release-drafter@v5
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/README.md b/README.md
index 599107bd..b51ab44b 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,7 @@
[![Changelog](https://img.shields.io/badge/docs-changelog-blue.svg)](https://github.com/MarkusAmshove/Kluent/blob/master/CHANGELOG.md)
[![Documentation](https://img.shields.io/badge/docs-documentation-blue.svg)](https://markusamshove.github.io/Kluent/)
[![Contributors](https://img.shields.io/badge/docs-contributors-blue.svg)](https://github.com/MarkusAmshove/Kluent/blob/master/AUTHORS.md)
+[![Current version](https://img.shields.io/maven-central/v/org.amshove.kluent/kluent?style=flat-square)](https://mvnrepository.com/artifact/org.amshove.kluent)
[Kluent](https://markusamshove.github.io/Kluent/) is a "Fluent Assertions" library written specifically for Kotlin.
@@ -12,8 +13,6 @@ of Kotlin to provide a fluent wrapper around the JUnit-Assertions.
[How to contribute](CONTRIBUTING.md)
-[ ![Download](https://api.bintray.com/packages/markusamshove/maven/kluent/images/download.svg) ](https://bintray.com/markusamshove/maven/kluent/_latestVersion)
-
----------
# Include it via gradle/maven
@@ -49,14 +48,6 @@ dependencies {
Replace {version} with the current version
```xml
-
-
-
- jcenter
- https://jcenter.bintray.com/
-
-
-
org.amshove.kluent
kluent
diff --git a/build.gradle b/build.gradle
index cc9fc452..cbbc957f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,11 +2,11 @@ buildscript {
repositories {
jcenter()
mavenCentral()
- maven { url "https://plugins.gradle.org/m2/" }
+ gradlePluginPortal()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- classpath "com.moowork.gradle:gradle-node-plugin:$gradle_node_version"
+ classpath "com.github.node-gradle:gradle-node-plugin:$gradle_node_version"
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:$kotlin_native_gradle_plugin_version"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+"
classpath 'com.adarshr:gradle-test-logger-plugin:1.6.0'
@@ -29,7 +29,7 @@ ext {
kotlin_test_annotations: "org.jetbrains.kotlin:kotlin-test-annotations-common:$kotlin_version",
kotlinx_coroutines_test: "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinx_coroutines_version",
- junit : "junit:junit:4.12",
+ junit : "junit:junit:4.13.2",
]
}
@@ -47,20 +47,10 @@ allprojects {
subprojects {
ext.configurePublishing = { artifactName = null ->
- apply plugin: 'maven'
+ apply plugin: 'maven-publish'
apply plugin: 'java'
apply plugin: 'signing'
- // Comment when publishing
- tasks.withType(Sign) {
- onlyIf { gradle.taskGraph.hasTask("publish") }
- }
-
- signing {
- useGpgCmd()
- sign configurations.archives
- }
-
artifactName = artifactName ?: project.name
task sourcesJar(type: Jar, dependsOn: classes) {
@@ -73,45 +63,57 @@ subprojects {
from javadoc
}
- artifacts {
- archives javadocJar, sourcesJar
+ java {
+ withJavadocJar()
+ withSourcesJar()
}
- uploadArchives {
+ publishing {
repositories {
- mavenDeployer {
- beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
-
- repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2') {
- authentication(userName: findProperty('ossrhUsername'), password: findProperty('ossrhPassword'))
+ maven {
+ url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
+ credentials {
+ username = findProperty('ossrhUsername')
+ password = findProperty('ossrhPassword')
}
- snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
- authentication(userName: findProperty('ossrhUsername'), password: findProperty('ossrhPassword'))
+ }
+ maven {
+ url = "https://oss.sonatype.org/content/repositories/snapshots/"
+ credentials {
+ username = findProperty('ossrhUsername')
+ password = findProperty('ossrhPassword')
}
+ }
+ }
- pom.project {
- name artifactName
+ publications {
+ mavenJava(MavenPublication) {
+ artifactId = artifactName
+ from components.java
+
+ pom {
+ name = artifactName
packaging 'jar'
- description 'Fluent Assertion-Library for Kotlin'
- url 'https://github.com/MarkusAmshove/Kluent'
+ description = 'Fluent Assertion-Library for Kotlin'
+ url = 'https://github.com/MarkusAmshove/Kluent'
scm {
- connection 'scm:git:git:github.com/MarkusAmshove/Kluent.git'
- developerConnection 'scm:git:git:github.com/MarkusAmshove/Kluent.git'
- url 'https://github.com/MarkusAmshove/Kluent'
+ connection = 'scm:git:git:github.com/MarkusAmshove/Kluent.git'
+ developerConnection = 'scm:git:git:github.com/MarkusAmshove/Kluent.git'
+ url = 'https://github.com/MarkusAmshove/Kluent'
}
licenses {
license {
- name 'MIT'
- url 'https://github.com/MarkusAmshove/Kluent/blob/master/LICENSE'
+ name = 'MIT'
+ url = 'https://github.com/MarkusAmshove/Kluent/blob/master/LICENSE'
}
}
developers {
developer {
- id 'markusamshove'
- name 'Markus Amshove'
+ id = 'markusamshove'
+ name = 'Markus Amshove'
}
}
}
@@ -119,6 +121,11 @@ subprojects {
}
}
+ signing {
+ useGpgCmd()
+ sign publishing.publications.mavenJava
+ }
+
task printArtifactName {
doLast {
logger.info("artifactName: $artifactName")
diff --git a/buildAll.sh b/buildAll.sh
index 803899b8..552aed01 100755
--- a/buildAll.sh
+++ b/buildAll.sh
@@ -10,6 +10,3 @@ echo 'Building Android'
echo 'Building JS'
./gradlew clean build -PJS -PSKIPJVM
-
-echo 'Building Native'
-./gradlew clean build -PNATIVE
diff --git a/gradle.properties b/gradle.properties
index ab902053..2bb4187c 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,7 +1,8 @@
kotlin_version=1.3.50
kotlin_native_gradle_plugin_version=1.3.41
kotlinx_coroutines_version=1.3.0
-gradle_node_version=1.2.0
+gradle_node_version=3.4.0
node_version=8.9.3
npm_version=5.5.1
kotlin.incremental.multiplatform=true
+signing.gnupg.executable=gpg
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 558870da..ae04661e 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/js/build.gradle b/js/build.gradle
index cab4b26d..17f947f2 100644
--- a/js/build.gradle
+++ b/js/build.gradle
@@ -1,5 +1,5 @@
apply plugin: 'kotlin-platform-js'
-apply plugin: 'com.moowork.node'
+apply plugin: 'com.github.node-gradle.node'
dependencies {
expectedBy project(':kluent-common')
@@ -48,7 +48,7 @@ task prepareMocha(dependsOn: [compileTestKotlin2Js, populateNodeModules, install
task runMocha(type: NodeTask, dependsOn: prepareMocha) {
script = file('node_modules/mocha/bin/mocha')
- args = [compileTestKotlin2Js.outputFile, '--require=source-map-support/register']
+ args = [compileTestKotlin2Js.outputFile.path, '--require=source-map-support/register']
if (project.hasProperty("teamcity")) args += '--reporter=mocha-teamcity-reporter'
}
diff --git a/js/package.json b/js/package.json
index 77c4b588..ff9a57cc 100644
--- a/js/package.json
+++ b/js/package.json
@@ -7,6 +7,6 @@
"mocha": "^4.1.0"
},
"dependencies": {
- "source-map-support": "^0.5.19"
+ "source-map-support": "^0.5.21"
}
}
diff --git a/publishAll.ps1 b/publishAll.ps1
deleted file mode 100644
index 7a891cbf..00000000
--- a/publishAll.ps1
+++ /dev/null
@@ -1,17 +0,0 @@
-param($user, $key)
-
-function Publish-Artifact($name, $gradleFlags) {
- Write-Host "Starting $name" -Foreground Yellow
- .\gradlew clean build $gradleFlags -PbintrayUser="$user" -PbintrayKey="$key"
- if($?) {
- Write-Host "Published $name" -Foreground Green
- } else {
- throw "Failure when publishing $name"
- }
-}
-
-
-Publish-Artifact "Common" @("kluent-common:bintrayUpload")
-Publish-Artifact "Java" @("kluent:bintrayUpload")
-Publish-Artifact "Android" @("kluent-android:bintrayUpload", "-PANDROID")
-Publish-Artifact "JavaScript" @("kluent-js:bintrayUpload", "-PJS", "-PSKIPJVM")
diff --git a/publishAll.sh b/publishAll.sh
index 758eefef..f737a527 100755
--- a/publishAll.sh
+++ b/publishAll.sh
@@ -1,3 +1,41 @@
#!/bin/bash
-echo Staging: ./gradlew clean uploadArchives [-PANDROID] [-PJS]
+set -u
+
+if [ $# != 0 ] && [ $# != 3 ];then
+ echo "Usage:"
+ echo " ./publishAll.sh"
+ echo " ./publishAll.sh SONATYPE_USERNAME SONATYPE_PASSWORD SIGNING_KEY"
+ exit 1
+fi
+
+if [ $# == 3 ];then
+ USERNAME_TOKEN="$1"
+ PASSWORD_TOKEN="$2"
+ SIGNING_KEY="$3"
+else
+ read -p "Sonatype username token: " USERNAME_TOKEN
+ read -p "Sonatype password token: " PASSWORD_TOKEN
+ read -p "Signing key: " SIGNING_KEY
+fi
+
+
+function publish {
+ PARAM=""
+ if [ $# == 1 ];then
+ PARAM="$1"
+ fi
+
+ ./gradlew clean check publishMavenJavaPublicationToMavenRepository -Psigning.gnupg.keyName="$SIGNING_KEY" -PossrhUsername=$USERNAME_TOKEN -PossrhPassword=$PASSWORD_TOKEN $PARAM
+ RC="$?"
+ if [ $RC != 0 ];then
+ echo "Building with parameter <$PARAM> failed"
+ exit 1
+ else
+ echo "Publishing with parameter <$PARAM> succeeded"
+ fi
+}
+
+publish
+publish "-PANDROID"
+publish "-PJS"