Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Gradle 8 and modernize #137

Merged
merged 10 commits into from
Sep 9, 2023
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.bat eol=crlf
*.sh eol=lf
5 changes: 5 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ endif::[]

= Gradle TestSets plugin

NOTE: Starting with version 7.3, Gradle now offers a built-in feature called
https://docs.gradle.org/8.2/userguide/jvm_test_suite_plugin.html[Test Suites]
that covers a lot of the functionality of this plugin. Please consider
migrating to the Gradle Test Suites plugin if it fits your needs.

A plugin for the Gradle build system that allows specifying test sets (like integration or acceptance tests).
A test set is a logical grouping of a source set and related dependency configurations, tasks and artifacts.

Expand Down
36 changes: 19 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
plugins {
kotlin("jvm")
`java-gradle-plugin`
id("com.gradle.plugin-publish") version "1.1.0"
id("com.gradle.plugin-publish") version "1.2.1"
`maven-publish`
}


repositories {
mavenCentral()
kotlin {
jvmToolchain(11)

compilerOptions {
freeCompilerArgs.add("-Xjvm-default=all")
}
}


Expand All @@ -31,6 +35,7 @@ dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")

testImplementation(kotlin("gradle-plugin"))
testImplementation("com.willowtreeapps.assertk:assertk-jvm:0.24")
Expand All @@ -39,14 +44,6 @@ dependencies {
}


tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xjvm-default=enable")
}
}


configurations.all {
resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlin") {
Expand All @@ -56,17 +53,20 @@ configurations.all {
}


@Suppress("UnstableApiUsage")
gradlePlugin {
website.set(extra["pluginBundle.website"].toString())
vcsUrl.set(extra["pluginBundle.vcsUrl"].toString())
website.set("https://github.com/unbroken-dome/gradle-testsets-plugin")
vcsUrl.set("https://github.com/unbroken-dome/gradle-testsets-plugin.git")
testSourceSets(integrationTest)

plugins.create("testSetsPlugin") {
id = "org.unbroken-dome.test-sets"
implementationClass = "org.unbrokendome.gradle.plugins.testsets.TestSetsPlugin"
displayName = extra["pluginBundle.displayName"].toString()
description = extra["pluginBundle.description"].toString()
tags.set(extra["pluginBundle.tags"].toString().split(','))
displayName = "Gradle TestSets plugin"
description = "A plugin for the Gradle build system that allows specifying test sets (like integration or " +
"acceptance tests). Each test set is a logical grouping of a source set, dependency configurations, " +
"and related tasks and artifacts."
tags.addAll("testing","testset","test set","integration test")
}
}

Expand All @@ -81,6 +81,8 @@ tasks {
}

withType<Test> {
outputs.upToDateWhen { false }
useJUnitPlatform()
testLogging.showStandardStreams = true
}
}
}
9 changes: 0 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
group=org.unbroken-dome.gradle-plugins
version=4.0.0

pluginBundle.displayName=Gradle TestSets plugin
pluginBundle.description=A plugin for the Gradle build system that allows specifying test sets (like integration or acceptance tests). Each test set is a logical grouping of a source set, dependency configurations, and related tasks and artifacts.
pluginBundle.website=https://github.com/unbroken-dome/gradle-testsets-plugin
pluginBundle.vcsUrl=https://github.com/unbroken-dome/gradle-testsets-plugin.git
pluginBundle.tags=testing,testset,test set,integration test

license_name=The MIT License (MIT)
license_url=http://opensource.org/licenses/MIT
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading