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

Fixing all Gradle deprecation warnings #609

Merged
merged 1 commit into from
Jan 26, 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
2 changes: 1 addition & 1 deletion benchmarks/agent-benchmark/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ task btracec(type: JavaExec) {

environment('BTRACE_HOME', "$projectDir")
classpath configurations.implementation
main 'org.openjdk.btrace.compiler.Compiler'
mainClass = 'org.openjdk.btrace.compiler.Compiler'
args '-d'
args "${buildDir}/classes/java/main/"
args '-packext'
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/runtime-benchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ task btracec(type: JavaExec) {

environment('BTRACE_HOME', "$projectDir")
classpath configurations.compilerDeps
main 'org.openjdk.btrace.compiler.Compiler'
mainClass = 'org.openjdk.btrace.compiler.Compiler'
args '-d'
args "${buildDir}/classes/java/main/"
args '-packext'
Expand Down
70 changes: 39 additions & 31 deletions btrace-dist/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'maven-publish'
id "com.github.johnrengelman.shadow" version "7.1.2"
id "nebula.ospackage" version "9.1.1"
id "com.netflix.nebula.ospackage" version "11.0.0"
id "java"
id "io.sdkman.vendors" version "3.0.0"
id "signing"
Expand Down Expand Up @@ -47,10 +47,10 @@ artifacts {

task agentJar(type: ShadowJar) {
group 'Build'
baseName = 'btrace-agent'
version = null
classifier = null
destinationDir = libsDir
archiveBaseName = 'btrace-agent'
archiveVersion = null
archiveClassifier = null
destinationDirectory = libsDir

manifest {
attributes(
Expand Down Expand Up @@ -84,10 +84,10 @@ task agentJar(type: ShadowJar) {

task bootJar(type: ShadowJar) {
group 'Build'
baseName = 'btrace-boot'
version = null
classifier = null
destinationDir = libsDir
archiveBaseName = 'btrace-boot'
archiveVersion = null
archiveClassifier = null
destinationDirectory = libsDir


include {
Expand Down Expand Up @@ -131,10 +131,10 @@ task bootJar(type: ShadowJar) {

task clientJar(type: ShadowJar) {
group 'Build'
baseName = 'btrace-client'
version = null
classifier = null
destinationDir = libsDir
archiveBaseName = 'btrace-client'
archiveVersion = null
archiveClassifier = null
destinationDirectory = libsDir

exclude 'afu/**'
exclude 'javax/**'
Expand Down Expand Up @@ -176,26 +176,34 @@ task copyDtraceLib(type: Copy) {
task buildZip(type: Zip) {
from "${distTarget}"
include "**/*"
archiveName "btrace-v${project.version}-bin.zip"
destinationDir(file("$project.buildDir/distributions"))

archiveBaseName = 'btrace'
archiveVersion = "v${project.version}"
archiveClassifier = "bin"
destinationDirectory = new File(project.buildDir, "distributions")
}

task buildSdkmanZip(type: Zip) {
from "${distBase}"
include "**/*"
archiveName "btrace-v${project.version}-sdkman-bin.zip"
destinationDir(file("$project.buildDir/distributions"))

archiveBaseName = 'btrace'
archiveVersion = "v${project.version}"
archiveClassifier = "sdkman-bin"
destinationDirectory = new File(project.buildDir, "distributions")
}

task buildTgz(type: Tar) {
archiveName "btrace-v${project.version}-bin.tar.gz"
into ('/'){
from "${distTarget}"
include '**/*'
}

destinationDir file("$project.buildDir/distributions")
extension 'tar.gz'
archiveBaseName = 'btrace'
archiveVersion = "v${project.version}"
archiveClassifier = "bin"
destinationDirectory = new File(project.buildDir, "distributions")
archiveExtension = 'tar.gz'
compression = Compression.GZIP
}

Expand Down Expand Up @@ -252,8 +260,8 @@ test {
group 'Documentation'
description "Build the btrace-${name} sources jar."

appendix "${name}"
classifier 'sources'
archiveAppendix = "${name}"
archiveClassifier = "sources"
from sourceSets.main.allSource
exclude excludes["${name}"]
}
Expand All @@ -266,7 +274,7 @@ test {
title = "btrace-${name}"
source = sourceSets.main.allJava
destinationDir = file("${project.docsDir}/${name}/javadoc")
classpath = files(compileJava.destinationDir) + configurations.artifact.asFileTree
classpath = files(compileJava.destinationDirectory) + configurations.artifact.asFileTree
exclude excludes["${name}"]
options.addStringOption('Xdoclint:all,-missing', '-quiet')
failOnError false
Expand All @@ -277,8 +285,8 @@ test {
group 'Documentation'
description "Build the btrace-${name} javadoc jar."

appendix name
classifier 'javadoc'
archiveAppendix = "${name}"
archiveClassifier = "javadoc"
from tasks["${name}Javadoc"].getOutputs()
}
}
Expand Down Expand Up @@ -318,10 +326,10 @@ publishing {
groupId 'io.btrace'
artifact agentJar
artifact agentSourcesJar {
classifier "sources"
archiveClassifier = "sources"
}
artifact agentJavadocJar {
classifier "javadoc"
archiveClassifier = "javadoc"
}
pom.withXml {
addPomDetails(asNode(), 'btrace-agent')
Expand All @@ -333,10 +341,10 @@ publishing {
groupId 'io.btrace'
artifact clientJar
artifact clientSourcesJar {
classifier "sources"
archiveClassifier = "sources"
}
artifact clientJavadocJar {
classifier "javadoc"
archiveClassifier = "javadoc"
}
pom.withXml {
addPomDetails(asNode(), 'btrace-client')
Expand All @@ -348,10 +356,10 @@ publishing {
groupId 'io.btrace'
artifact bootJar
artifact bootSourcesJar {
classifier "sources"
archiveClassifier = "sources"
}
artifact bootJavadocJar {
classifier "javadoc"
archiveClassifier = "javadoc"
}
pom.withXml {
addPomDetails(asNode(), 'btrace-boot')
Expand Down
2 changes: 1 addition & 1 deletion btrace-dtrace/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sourceSets {

shadowJar {
include 'org/openjdk/btrace/dtrace/**/*'
classifier = null
archiveClassifier = null
}

sourcesJar {
Expand Down
4 changes: 2 additions & 2 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ javadoc {
}

task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') {
classifier = 'sources'
archiveClassifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}

Expand Down