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:
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: [11, 17, 21]
|
||||
java-version: [8, 11, 17, 21]
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-latest
|
||||
|
|
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
|||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: "11"
|
||||
java-version: "21"
|
||||
distribution: "zulu"
|
||||
|
||||
- name: Validate Gradle wrapper
|
||||
|
|
|
@ -60,7 +60,7 @@ repositories {
|
|||
}
|
||||
|
||||
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>
|
||||
<groupId>net.thauvin.erik.urlencoder</groupId>
|
||||
<artifactId>urlencoder-lib-jvm</artifactId>
|
||||
<version>1.5.0</version>
|
||||
<version>1.6.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ plugins {
|
|||
}
|
||||
|
||||
group = "net.thauvin.erik.urlencoder"
|
||||
version = "1.5.0"
|
||||
version = "1.6.0"
|
||||
|
||||
dependencies {
|
||||
kover(projects.urlencoderLib)
|
||||
|
|
|
@ -4,8 +4,9 @@ plugins {
|
|||
|
||||
dependencies {
|
||||
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.kotlin:kotlin-gradle-plugin:1.9.23")
|
||||
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:0.7.4")
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24")
|
||||
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:0.8.3")
|
||||
implementation("org.apache.httpcomponents:httpclient:4.5.13")
|
||||
}
|
||||
|
|
|
@ -45,12 +45,12 @@ kotlin {
|
|||
|
||||
tasks {
|
||||
withType<JavaCompile>().configureEach {
|
||||
sourceCompatibility = JavaVersion.VERSION_11.toString()
|
||||
targetCompatibility = JavaVersion.VERSION_11.toString()
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
|
||||
targetCompatibility = JavaVersion.VERSION_1_8.toString()
|
||||
}
|
||||
|
||||
withType<KotlinJvmCompile>().configureEach {
|
||||
compilerOptions.jvmTarget.set(JvmTarget.JVM_11)
|
||||
compilerOptions.jvmTarget.set(JvmTarget.JVM_1_8)
|
||||
}
|
||||
|
||||
withType<Test>().configureEach {
|
||||
|
|
|
@ -16,14 +16,13 @@
|
|||
|
||||
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.tasks.testing.TestDescriptor
|
||||
import org.gradle.api.tasks.testing.TestListener
|
||||
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(
|
||||
private val testBadgeApiKey: Provider<String>
|
||||
|
@ -41,23 +40,23 @@ class Rife2TestListener(
|
|||
|
||||
if (apiKey != null) {
|
||||
println(apiKey)
|
||||
val response: HttpResponse<String> = HttpClient.newHttpClient()
|
||||
.send(
|
||||
HttpRequest.newBuilder()
|
||||
.uri(
|
||||
URI(
|
||||
"https://rife2.com/tests-badge/update/net.thauvin.erik/urlencoder?" +
|
||||
"apiKey=$apiKey&" +
|
||||
"passed=$passed&" +
|
||||
"failed=$failed&" +
|
||||
"skipped=$skipped"
|
||||
)
|
||||
)
|
||||
.POST(HttpRequest.BodyPublishers.noBody())
|
||||
.build(), HttpResponse.BodyHandlers.ofString()
|
||||
)
|
||||
println("RESPONSE: ${response.statusCode()}")
|
||||
println(response.body())
|
||||
val url = "https://rife2.com/tests-badge/update/net.thauvin.erik/urlencoder?" +
|
||||
"apiKey=$apiKey&" +
|
||||
"passed=$passed&" +
|
||||
"failed=$failed&" +
|
||||
"skipped=$skipped"
|
||||
|
||||
val client = HttpClients.createDefault()
|
||||
val post = HttpPost(url)
|
||||
|
||||
val response = client.execute(post)
|
||||
val entity = response.entity
|
||||
|
||||
val statusCode = response.statusLine.statusCode
|
||||
val responseBody = EntityUtils.toString(entity, "UTF-8")
|
||||
|
||||
println("RESPONSE: $statusCode")
|
||||
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
|
||||
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
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
7
gradlew
vendored
7
gradlew
vendored
|
@ -15,6 +15,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
|
@ -55,7 +57,7 @@
|
|||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (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.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
@ -84,7 +86,8 @@ done
|
|||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# 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.
|
||||
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 limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue