Skip to content

Commit

Permalink
style: format jmh.gradle, use not deprecated archiveFileName (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
DotSpy authored Feb 6, 2020
1 parent 65179f8 commit 2a1a765
Showing 1 changed file with 26 additions and 26 deletions.
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"
}
}
}
}
}

0 comments on commit 2a1a765

Please sign in to comment.