Compare commits
10 commits
Author | SHA1 | Date | |
---|---|---|---|
b882d68d4c | |||
9e60b31f9e | |||
c69d7b7076 | |||
742c221a20 | |||
0b6e55b338 | |||
09b44d53e8 | |||
df7482c3a0 | |||
3e36e389fb | |||
d66fdb12e6 | |||
|
6f33f9c2a9 |
11 changed files with 40 additions and 35 deletions
2
.github/workflows/gradle.yml
vendored
2
.github/workflows/gradle.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java-version: [11, 17, 21]
|
java-version: [8, 11, 17, 21]
|
||||||
os:
|
os:
|
||||||
- macos-latest
|
- macos-latest
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
|
|
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: "11"
|
java-version: "21"
|
||||||
distribution: "zulu"
|
distribution: "zulu"
|
||||||
|
|
||||||
- name: Validate Gradle wrapper
|
- name: Validate Gradle wrapper
|
||||||
|
|
|
@ -60,7 +60,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("net.thauvin.erik.urlencoder:urlencoder-lib:1.5.0")
|
implementation("net.thauvin.erik.urlencoder:urlencoder-lib:1.6.0")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ to the artifact URL.
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.thauvin.erik.urlencoder</groupId>
|
<groupId>net.thauvin.erik.urlencoder</groupId>
|
||||||
<artifactId>urlencoder-lib-jvm</artifactId>
|
<artifactId>urlencoder-lib-jvm</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.6.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "net.thauvin.erik.urlencoder"
|
group = "net.thauvin.erik.urlencoder"
|
||||||
version = "1.5.0"
|
version = "1.6.0"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
kover(projects.urlencoderLib)
|
kover(projects.urlencoderLib)
|
||||||
|
|
|
@ -4,8 +4,9 @@ plugins {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.github.ben-manes:gradle-versions-plugin:0.51.0")
|
implementation("com.github.ben-manes:gradle-versions-plugin:0.51.0")
|
||||||
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.1")
|
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.7")
|
||||||
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.9.20")
|
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.9.20")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23")
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24")
|
||||||
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:0.7.4")
|
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:0.8.3")
|
||||||
|
implementation("org.apache.httpcomponents:httpclient:4.5.13")
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,12 +45,12 @@ kotlin {
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
withType<JavaCompile>().configureEach {
|
withType<JavaCompile>().configureEach {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11.toString()
|
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
|
||||||
targetCompatibility = JavaVersion.VERSION_11.toString()
|
targetCompatibility = JavaVersion.VERSION_1_8.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
withType<KotlinJvmCompile>().configureEach {
|
withType<KotlinJvmCompile>().configureEach {
|
||||||
compilerOptions.jvmTarget.set(JvmTarget.JVM_11)
|
compilerOptions.jvmTarget.set(JvmTarget.JVM_1_8)
|
||||||
}
|
}
|
||||||
|
|
||||||
withType<Test>().configureEach {
|
withType<Test>().configureEach {
|
||||||
|
|
|
@ -16,14 +16,13 @@
|
||||||
|
|
||||||
package buildsrc.utils
|
package buildsrc.utils
|
||||||
|
|
||||||
|
import org.apache.http.client.methods.HttpPost
|
||||||
|
import org.apache.http.impl.client.HttpClients
|
||||||
|
import org.apache.http.util.EntityUtils
|
||||||
import org.gradle.api.provider.Provider
|
import org.gradle.api.provider.Provider
|
||||||
import org.gradle.api.tasks.testing.TestDescriptor
|
import org.gradle.api.tasks.testing.TestDescriptor
|
||||||
import org.gradle.api.tasks.testing.TestListener
|
import org.gradle.api.tasks.testing.TestListener
|
||||||
import org.gradle.api.tasks.testing.TestResult
|
import org.gradle.api.tasks.testing.TestResult
|
||||||
import java.net.URI
|
|
||||||
import java.net.http.HttpClient
|
|
||||||
import java.net.http.HttpRequest
|
|
||||||
import java.net.http.HttpResponse
|
|
||||||
|
|
||||||
class Rife2TestListener(
|
class Rife2TestListener(
|
||||||
private val testBadgeApiKey: Provider<String>
|
private val testBadgeApiKey: Provider<String>
|
||||||
|
@ -41,23 +40,23 @@ class Rife2TestListener(
|
||||||
|
|
||||||
if (apiKey != null) {
|
if (apiKey != null) {
|
||||||
println(apiKey)
|
println(apiKey)
|
||||||
val response: HttpResponse<String> = HttpClient.newHttpClient()
|
val url = "https://rife2.com/tests-badge/update/net.thauvin.erik/urlencoder?" +
|
||||||
.send(
|
"apiKey=$apiKey&" +
|
||||||
HttpRequest.newBuilder()
|
"passed=$passed&" +
|
||||||
.uri(
|
"failed=$failed&" +
|
||||||
URI(
|
"skipped=$skipped"
|
||||||
"https://rife2.com/tests-badge/update/net.thauvin.erik/urlencoder?" +
|
|
||||||
"apiKey=$apiKey&" +
|
val client = HttpClients.createDefault()
|
||||||
"passed=$passed&" +
|
val post = HttpPost(url)
|
||||||
"failed=$failed&" +
|
|
||||||
"skipped=$skipped"
|
val response = client.execute(post)
|
||||||
)
|
val entity = response.entity
|
||||||
)
|
|
||||||
.POST(HttpRequest.BodyPublishers.noBody())
|
val statusCode = response.statusLine.statusCode
|
||||||
.build(), HttpResponse.BodyHandlers.ofString()
|
val responseBody = EntityUtils.toString(entity, "UTF-8")
|
||||||
)
|
|
||||||
println("RESPONSE: ${response.statusCode()}")
|
println("RESPONSE: $statusCode")
|
||||||
println(response.body())
|
println(responseBody)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -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.2-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
7
gradlew
vendored
7
gradlew
vendored
|
@ -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
|
||||||
|
|
2
gradlew.bat
vendored
2
gradlew.bat
vendored
|
@ -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 ##########################################################################
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue