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

All dependencies handing switched to dependencyResolutionManagement #612

Merged
merged 2 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions benchmarks/agent-benchmark/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id("me.champeau.jmh") version "0.6.8"
alias(libs.plugins.jmh)
}

description 'A JMH benchmark to assert the overhead imposed by various types of BTrace instrumentation.'
Expand All @@ -11,11 +11,10 @@ def javaHome = env['JAVA_HOME']
dependencies {
implementation project(path: ":btrace-dist", configuration: "shadow")
implementation project(":btrace-compiler")
jmh project(":btrace-instr")
jmh project(":btrace-runtime")
jmh project(":btrace-statsd")
jmh("org.openjdk.jmh:jmh-core:1.36")
jmh("org.openjdk.jmh:jmh-generator-annprocess:1.36")
jmh tasks.getByPath(':btrace-dist:bootJar').outputs.getFiles()

jmh libs.jmh
jmh libs.jmh.annprocess
}

task btracec(type: JavaExec) {
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/runtime-benchmarks/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id("me.champeau.jmh") version "0.6.8"
alias(libs.plugins.jmh)
}

description 'A JMH benchmark to assert the overhead imposed by various types of BTrace instrumentation.'
Expand All @@ -18,8 +18,8 @@ dependencies {
jmh project(":btrace-instr")
jmh project(":btrace-runtime")
jmh project(":btrace-statsd")
jmh("org.openjdk.jmh:jmh-core:1.36")
jmh("org.openjdk.jmh:jmh-generator-annprocess:1.36")
jmh libs.jmh
jmh libs.jmh.annprocess
compilerDeps project(path: ":btrace-dist", configuration: "shadow")
compilerDeps project(":btrace-compiler")
}
Expand Down
6 changes: 2 additions & 4 deletions btrace-agent/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
dependencies {
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'

implementation(group: 'org.ow2.asm', name: 'asm', version: "${rootProject.asmVersion}")
implementation libs.slf4j
implementation libs.asm

implementation files("${JAVA_8_HOME}/lib/tools.jar")
implementation project(':btrace-core')
Expand Down
12 changes: 5 additions & 7 deletions btrace-client/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
plugins {
id 'net.nemerosa.versioning' version '2.15.1'
alias(libs.plugins.versioning)
}

dependencies {
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'

implementation(group: 'org.ow2.asm', name: 'asm', version: "${rootProject.asmVersion}")
implementation(group: 'org.ow2.asm', name: 'asm-tree', version: "${rootProject.asmVersion}")
implementation(group: 'org.ow2.asm', name: 'asm-util', version: "${rootProject.asmVersion}")
implementation libs.slf4j
implementation libs.asm
implementation libs.asm.tree
implementation libs.asm.util

implementation files("${JAVA_8_HOME}/lib/tools.jar")

Expand Down
4 changes: 2 additions & 2 deletions btrace-compiler/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies {
// https://mvnrepository.com/artifact/org.ow2.asm/asm
implementation(group: 'org.ow2.asm', name: 'asm', version: "${rootProject.asmVersion}")
implementation(group: 'org.ow2.asm', name: 'asm-util', version: "${rootProject.asmVersion}")
implementation libs.asm
implementation libs.asm.util

implementation files("${JAVA_8_HOME}/lib/tools.jar")
implementation project(path: ':btrace-core')
Expand Down
19 changes: 6 additions & 13 deletions btrace-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
import org.apache.tools.ant.filters.*

plugins {
id 'net.nemerosa.versioning' version '2.15.1'
alias(libs.plugins.versioning)
}

dependencies {
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'

// https://mvnrepository.com/artifact/org.slf4j/slf4j-simple
implementation(group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.36')

// https://mvnrepository.com/artifact/org.jctools/jctools-core
implementation(group: 'org.jctools', name: 'jctools-core', version: '4.0.1')

// https://mvnrepository.com/artifact/org.ow2.asm/asm
implementation(group: 'org.ow2.asm', name: 'asm', version: "${rootProject.asmVersion}")
implementation(group: 'org.ow2.asm', name: 'asm-util', version: "${rootProject.asmVersion}")
implementation libs.slf4j
implementation libs.slf4j.simple
implementation libs.jctools
implementation libs.asm
implementation libs.asm.util
}

compileJava {
Expand Down
10 changes: 5 additions & 5 deletions btrace-dist/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
id 'java'
id 'signing'
id 'maven-publish'
id "com.github.johnrengelman.shadow" version "7.1.2"
id "com.netflix.nebula.ospackage" version "11.0.0"
id "java"
id "io.sdkman.vendors" version "3.0.0"
id "signing"
alias(libs.plugins.shadow)
alias(libs.plugins.ospackage)
alias(libs.plugins.sdkman.vendors)
}

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
Expand Down
2 changes: 1 addition & 1 deletion btrace-dtrace/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import org.gradle.internal.os.OperatingSystem
import org.gradle.internal.jvm.Jvm

plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'java'
alias(libs.plugins.shadow)
}

def nativeHeadersDir = "${buildDir}/generated/native/include"
Expand Down
27 changes: 10 additions & 17 deletions btrace-instr/build.gradle
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
import java.nio.file.Files
import java.nio.file.Paths

apply plugin: 'java'

buildscript {
dependencies {
classpath files('../btrace-compiler/build/classes/main/java')
}
plugins {
id 'java'
}

dependencies {
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'
implementation group: 'org.ow2.asm', name: 'asm', version: "${rootProject.asmVersion}"
implementation group: 'org.ow2.asm', name: 'asm-tree', version: "${rootProject.asmVersion}"
implementation group: 'com.google.auto.service', name: 'auto-service', version: '1.0.1'

implementation libs.slf4j
implementation libs.asm
implementation libs.asm.tree
implementation libs.autoService
implementation libs.jctools
implementation project(':btrace-core')
implementation project(':btrace-services-api')
implementation project(':btrace-runtime')
implementation project(':btrace-compiler')
implementation project(':btrace-statsd')

// https://mvnrepository.com/artifact/org.jctools/jctools-core
implementation(group: 'org.jctools', name: 'jctools-core', version: '4.0.1')

testImplementation libs.asm.util
testImplementation libs.slf4j.simple
testImplementation libs.junit.jupiter
testImplementation project(':btrace-client')
testImplementation("org.junit.jupiter:junit-jupiter-params:5.9.1")
testImplementation group: 'org.ow2.asm', name: 'asm-util', version: "${rootProject.asmVersion}"
}

compileTestJava {
Expand Down
2 changes: 1 addition & 1 deletion btrace-ui/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'net.nemerosa.versioning' version '2.15.1'
alias(libs.plugins.versioning)
}

sourceCompatibility = '11'
Expand Down
4 changes: 1 addition & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
plugins {
id "jacoco"
id "com.diffplug.spotless" version "6.13.0"
alias(libs.plugins.spotless)
}

project.ext.asmVersion = "9.4"

repositories {
mavenCentral()
}
Expand Down
3 changes: 1 addition & 2 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ repositories {

dependencies {
// Adding dependencies here will add the dependencies to each subproject.
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1'
testImplementation libs.junit.jupiter
}

String mavenArtifactId = name
Expand Down
8 changes: 0 additions & 8 deletions integration-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ sourceSets {
}
}

dependencies {
testImplementation project(':btrace-instr')
testImplementation project(':btrace-dist')
testImplementation project(':btrace-client')
testImplementation("org.junit.jupiter:junit-jupiter-params:5.9.1")
testImplementation group: 'org.ow2.asm', name: 'asm-util', version: "${rootProject.asmVersion}"
}

compileJava11_dummyJava {
sourceCompatibility = 8
targetCompatibility = 8
Expand Down
46 changes: 46 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,49 @@ subDirs.each { File dir ->
include "benchmarks:runtime-benchmarks"
}

dependencyResolutionManagement {
versionCatalogs {
libs {
// Families...
version('asm', '9.4')
version('jmh', '1.36')
version('jmhGradlePlugin', '0.6.5')
version('slf4j', '1.7.36')
version('junit', '5.9.1')

// *** Gradle plugins ***
plugin ('spotless', 'com.diffplug.spotless').version('6.11.0')
plugin ('versioning', 'net.nemerosa.versioning').version('2.15.1')
plugin ('ospackage', 'com.netflix.nebula.ospackage').version('11.0.0')
plugin ('shadow', 'com.github.johnrengelman.shadow').version('7.1.2')
plugin ('sdkman-vendors', 'io.sdkman.vendors').version('3.0.0')

plugin ('jmh', 'me.champeau.jmh').versionRef('jmhGradlePlugin')

// *** Libraries ***

// https://mvnrepository.com/artifact/com.google.auto.service
library ('autoService', 'com.google.auto.service', 'auto-service').version('1.0.1')
// https://mvnrepository.com/artifact/org.jctools
library ('jctools', 'org.jctools', 'jctools-core').version('4.0.1')


// https://mvnrepository.com/artifact/org.slf4j
library ('slf4j', 'org.slf4j', 'slf4j-api').versionRef('slf4j')
library ('slf4j-simple', 'org.slf4j', 'slf4j-simple').versionRef('slf4j')

// https://mvnrepository.com/artifact/org.ow2.asm
library ('asm', 'org.ow2.asm', 'asm').versionRef('asm')
library ('asm-tree', 'org.ow2.asm', 'asm-tree').versionRef('asm')
library ('asm-util', 'org.ow2.asm', 'asm-util').versionRef('asm')

// https://mvnrepository.com/artifact/org.openjdk.jmh
library ('jmh', 'org.openjdk.jmh', 'jmh-core').versionRef('jmh')
library ('jmh-annprocess', 'org.openjdk.jmh', 'jmh-generator-annprocess').versionRef('jmh')

// https://mvnrepository.com/artifact/org.junit.jupiter
library ('junit', 'org.junit', 'junit-bom').versionRef('junit')
library ('junit-jupiter', 'org.junit.jupiter', 'junit-jupiter').versionRef('junit')
}
}
}