Skip to content

Commit

Permalink
Fix most Gradle warnings in build (#2904)
Browse files Browse the repository at this point in the history
  • Loading branch information
TWiStErRob committed Feb 11, 2023
1 parent 38b1f44 commit 87ee387
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ allprojects { proj ->

configurations {
testUtil //TODO move to separate project
// Putting 'provided' dependencies on test compile and runtime classpath.
testCompileOnly.extendsFrom(compileOnly)
testRuntimeOnly.extendsFrom(compileOnly)
}

dependencies {
Expand All @@ -92,10 +95,6 @@ dependencies {

testImplementation libraries.assertj

//putting 'provided' dependencies on test compile and runtime classpath
testCompileOnly configurations.compileOnly
testRuntimeOnly configurations.compileOnly

testUtil sourceSets.test.output

signature 'org.codehaus.mojo.signature:java18:1.0@signature'
Expand Down
4 changes: 2 additions & 2 deletions gradle/java-library.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ apply from: "$rootDir/gradle/retry-test.gradle"

tasks.withType(Checkstyle) {
reports {
xml.enabled false
html.enabled true
xml.required = false
html.required = true
html.stylesheet resources.text.fromFile("$rootDir/config/checkstyle/checkstyle.xsl")
}
}
2 changes: 1 addition & 1 deletion gradle/java-publication.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ publishing {
//Gradle does not write 'jar' packaging to the pom (unlike other packaging types).
//This is OK because 'jar' is implicit/default:
// https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#minimal-pom
packaging = project.tasks.jar.extension
packaging = project.tasks.jar.archiveExtension.get()
}

url = "https://github.com/mockito/mockito"
Expand Down
2 changes: 1 addition & 1 deletion gradle/mockito-core/osgi.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jar {
'Bundle-SymbolicName': 'org.mockito.mockito-core',
'Bundle-Version': "\${version_cleanup;${project.version}}",
'-versionpolicy': '[${version;==;${@}},${version;+;${@}})',
'Export-Package': "org.mockito.internal.*;status=INTERNAL;mandatory:=status;version=${version},org.mockito.*;version=${version}",
'Export-Package': "org.mockito.internal.*;status=INTERNAL;mandatory:=status;version=${archiveVersion.get()},org.mockito.*;version=${archiveVersion.get()}",
'Import-Package': [
'net.bytebuddy.*;version="[1.6.0,2.0)"',
'junit.*;resolution:=optional',
Expand Down
4 changes: 2 additions & 2 deletions gradle/root/coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ task mockitoCoverage(type: JacocoReport) {
}

reports {
xml.enabled true
html.enabled true
xml.required = true
html.required = true
html.destination file("${buildDir}/jacocoHtml")
}

Expand Down
2 changes: 1 addition & 1 deletion subprojects/junit-jupiter/junit-jupiter.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jar {
'Bundle-SymbolicName': 'org.mockito.junit-jupiter',
'Bundle-Version': "\${version_cleanup;${project.version}}",
'-versionpolicy': '[${version;==;${@}},${version;+;${@}})',
'Export-Package': "org.mockito.junit.jupiter.*;version=${version}",
'Export-Package': "org.mockito.junit.jupiter.*;version=${archiveVersion.get()}",
'-removeheaders': 'Private-Package',
'Automatic-Module-Name': 'org.mockito.junit.jupiter',
'-noextraheaders': 'true',
Expand Down

0 comments on commit 87ee387

Please sign in to comment.