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

Format jmh.gradle, use not deprecated archiveFileName #821

Merged
merged 2 commits into from
Feb 6, 2020
Merged
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
52 changes: 26 additions & 26 deletions jmh.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@

sourceSets {
jmh {
java.srcDir 'src/jmh/java'
resources.srcDir 'src/jmh/resources'
compileClasspath += main.output
runtimeClasspath += main.output
java.srcDir 'src/jmh/java'
resources.srcDir 'src/jmh/resources'
compileClasspath += main.output
runtimeClasspath += main.output
}
}

Expand All @@ -68,17 +68,17 @@ dependencies {

configurations {
jmhCompile {
extendsFrom compile
extendsFrom compile
}

jmhImplementation {
extendsFrom implementation
extendsFrom jmhCompile
extendsFrom implementation
extendsFrom jmhCompile
}

jmh {
extendsFrom runtime
extendsFrom jmhCompile
extendsFrom runtime
extendsFrom jmhCompile
}
}

Expand Down Expand Up @@ -107,36 +107,36 @@ task jmhJar(type: Jar) {
group 'Build'
classifier "jmh"
doFirst {
manifest {
attributes('Main-Class': 'org.openjdk.jmh.Main', 'Class-Path': ([jar.archiveName] + configurations.runtimeClasspath.files.collect { it.getName() }).join(' '))
}
manifest {
attributes('Main-Class': 'org.openjdk.jmh.Main', 'Class-Path': ([jar.archiveFileName] + configurations.runtimeClasspath.files.collect { it.getName() }).join(' '))
}
}
from {
// Only include JMH benchmarks and JMH in Jar file
(configurations.jmhRuntimeClasspath.files - configurations.runtimeClasspath.files).collect { it.isDirectory() ? it : zipTree(it) }
// Only include JMH benchmarks and JMH in Jar file
(configurations.jmhRuntimeClasspath.files - configurations.runtimeClasspath.files).collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
exclude 'log4j.properties'
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
exclude 'log4j.properties'
}
from sourceSets.jmh.output
}

artifacts {
if (benchmarksAvailable) {
archives jmhJar
archives jmhJar
}
}

publishing {
publications {
mavenJava(MavenPublication) {
if (benchmarksAvailable) {
artifact jmhJar {
classifier "jmh"
}
}
}
mavenJava(MavenPublication) {
if (benchmarksAvailable) {
artifact jmhJar {
classifier "jmh"
}
}
}
}
}