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

Fix Gradle 8.1 Compatibility #26

Merged
merged 11 commits into from
Apr 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{kt,kts}]
max_line_length = 140
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ for more details.
- Apply plugin in `build.gradle`:
```groovy
plugins {
id "pl.droidsonroids.jacoco.testkit" version "1.0.8"
id "pl.droidsonroids.jacoco.testkit" version "1.0.9"
}
```
This will add `testkit-gradle.properties` system resource.
Expand Down Expand Up @@ -56,13 +56,13 @@ class AwesomeTest {
### Adding coverage for another task (ex. integrationTest)
By default the plugin configures the `test` task for any project with Java plugin applied.

To configure the coverage for another task just add something like this:
To configure the coverage for another task just add something like this:
```groovy
jacocoTestKit {
applyTo("intTestRuntimeOnly", tasks.named("integrationTest"))
}
```

### Custom JaCoCo destination file
JaCoCo destination file path reads it from the `JacocoTaskExtension` so you can change it like this:
```groovy
Expand All @@ -73,5 +73,5 @@ tasks.named("test").configure {
}
```

### Update from 1.0.5 or older
Starting from plugin version 1.0.6 the minimum supported Gradle version is 4.9
### Requirements
Minimum supported Gradle version is 7.6
33 changes: 12 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.32'
id 'com.gradle.plugin-publish' version '0.14.0'
id 'org.jetbrains.kotlin.jvm' version '1.8.20'
id 'com.gradle.plugin-publish' version '1.2.0'
id 'jacoco'
id 'java-gradle-plugin'
id 'pl.droidsonroids.jacoco.testkit' version '1.0.8'
// id 'pl.droidsonroids.jacoco.testkit' version '1.0.8'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be uncommented after the release

}

dependencies {
Expand All @@ -12,45 +12,36 @@ dependencies {
testImplementation 'org.assertj:assertj-core:3.16.1'
}

repositories {
mavenCentral()
}

group = GROUP
version = VERSION_NAME

pluginBundle {
gradlePlugin {
website = POM_URL
vcsUrl = POM_SCM_URL
description = POM_DESCRIPTION
tags = ['jacoco', 'coverage', 'testkit', 'test']

plugins {
jacocoTestKitPlugin {
id = 'pl.droidsonroids.jacoco.testkit'
implementationClass = 'pl.droidsonroids.gradle.jacoco.testkit.JaCoCoTestKitPlugin'
displayName = POM_NAME
description = POM_DESCRIPTION
tags.set(['jacoco', 'coverage', 'testkit', 'test'])
}
}
}

gradlePlugin {
plugins {
jacocoTestKitPlugin {
id = 'pl.droidsonroids.jacoco.testkit'
implementationClass = 'pl.droidsonroids.gradle.jacoco.testkit.JaCoCoTestKitPlugin'
}
}
kotlin {
jvmToolchain(17)
}

jacoco {
toolVersion '0.8.6'
toolVersion '0.8.9'
}

jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
html.enabled true
xml.required = true
csv.required = false
html.required = true
}
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ POM_PACKAGING=jar
[email protected]
POM_INCEPTION_YEAR=2017
POM_DEVELOPER_NAME=Karol Wrótniak
org.gradle.caching=true
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-7.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading