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 most Gradle warnings in build #2904

Merged
merged 6 commits into from
Feb 11, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 ->

TimvdLippe marked this conversation as resolved.
Show resolved Hide resolved
TimvdLippe marked this conversation as resolved.
Show resolved Hide resolved
configurations {
testUtil //TODO move to separate project
// Putting 'provided' dependencies on test compile and runtime classpath.
testCompileOnly.extendsFrom(compileOnly)
testRuntimeOnly.extendsFrom(compileOnly)
TimvdLippe marked this conversation as resolved.
Show resolved Hide resolved
}

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
TimvdLippe marked this conversation as resolved.
Show resolved Hide resolved

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
TimvdLippe marked this conversation as resolved.
Show resolved Hide resolved
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()
TimvdLippe marked this conversation as resolved.
Show resolved Hide resolved
}

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()}",
TimvdLippe marked this conversation as resolved.
Show resolved Hide resolved
'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
TimvdLippe marked this conversation as resolved.
Show resolved Hide resolved
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()}",
TimvdLippe marked this conversation as resolved.
Show resolved Hide resolved
'-removeheaders': 'Private-Package',
'Automatic-Module-Name': 'org.mockito.junit.jupiter',
'-noextraheaders': 'true',
Expand Down