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

Rename hibernate modules #205

Merged
merged 7 commits into from
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes from 6 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
54 changes: 54 additions & 0 deletions gradle/instrumentation.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// common gradle file for instrumentation

apply plugin: 'net.bytebuddy.byte-buddy'
apply plugin: 'muzzle'

byteBuddy {
transformation {
// Applying NoOp optimizes build by applying bytebuddy plugin to only compileJava task
tasks = ['compileJava', 'compileScala', 'compileKotlin']
plugin = 'io.opentelemetry.auto.tooling.muzzle.MuzzleGradlePlugin$NoOp'
}
}

apply from: "${rootDir}/gradle/java.gradle"

afterEvaluate {
byteBuddy {
transformation {
tasks = ['compileJava', 'compileScala', 'compileKotlin']
plugin = 'io.opentelemetry.auto.tooling.muzzle.MuzzleGradlePlugin'
classPath = project(':auto-tooling').configurations.instrumentationMuzzle + configurations.compile + sourceSets.main.output
}
}

String jdkCompile = null
if (project.hasProperty('minJavaVersionForTests') && project.getProperty('minJavaVersionForTests') != JavaVersion.VERSION_1_7) {
def version = JavaVersion.toVersion(project.getProperty('minJavaVersionForTests'))
def name = "java$version.majorVersion"
jdkCompile = "main_${name}Compile"
}
dependencies {
// Apply common dependencies for instrumentation.
compile(project(':auto-tooling')) {
// OpenTelemetry SDK is not needed for compilation, and :opentelemetry-sdk-shaded-for-testing
// is brought in for tests by project(:testing) below
exclude group: 'io.opentelemetry', module: 'opentelemetry-sdk'
}
compile deps.bytebuddy
if (jdkCompile) {
"$jdkCompile"(project(':auto-tooling')) {
// OpenTelemetry SDK is not needed for compilation, and :opentelemetry-sdk-shaded-for-testing
// is brought in for tests by project(:testing) below
exclude group: 'io.opentelemetry', module: 'opentelemetry-sdk'
}
"$jdkCompile" deps.bytebuddy
}
annotationProcessor deps.autoservice
implementation deps.autoservice

testCompile project(':testing')
testAnnotationProcessor deps.autoservice
testImplementation deps.autoservice
}
}
2 changes: 1 addition & 1 deletion gradle/java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ if (project.hasProperty("removeJarVersionNumbers") && removeJarVersionNumbers) {
}
}

if (project.parent && project.parent.hasProperty("javaExecutableVersionCache")) {
if (project.parent && project.parent.ext.has("javaExecutableVersionCache")) {
project.ext.javaExecutableVersionCache = project.parent.ext.javaExecutableVersionCache
} else {
project.ext.javaExecutableVersionCache = [:]
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/akka-http-10.0/akka-http-10.0.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/java.gradle"
apply from: "${rootDir}/gradle/instrumentation.gradle"
apply from: "${rootDir}/gradle/test-with-scala.gradle"

apply plugin: 'org.unbroken-dome.test-sets'

testSets {
lagomTest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

muzzle {
pass {
group = "org.apache.httpcomponents"
Expand All @@ -11,9 +14,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

testSets {
latestDepTest {
dirName = 'test'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

muzzle {
pass {
group = "commons-httpclient"
Expand All @@ -7,9 +10,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

testSets {
latestDepTest {
dirName = 'test'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

muzzle {
fail {
group = "commons-httpclient"
Expand All @@ -19,9 +22,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

testSets {
latestDepTest {
dirName = 'test'
Expand Down
7 changes: 3 additions & 4 deletions instrumentation/aws-sdk-1.11/aws-sdk-1.11.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

// compiling against 1.11.0, but instrumentation should work against 1.10.33 with varying effects,
// depending on the version's implementation. (i.e. DeleteOptionGroup may have less handlerCounts than
// expected in 1.11.84. Testing against 1.11.0 instead of 1.10.33 because the RequestHandler class
Expand All @@ -14,10 +17,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"

apply plugin: 'org.unbroken-dome.test-sets'

testSets {
// Features used in test_1_11_106 (builder) is available since 1.11.84, but
// using 1.11.106 because of previous concerns with byte code differences
Expand Down
7 changes: 3 additions & 4 deletions instrumentation/aws-sdk-2.2/aws-sdk-2.2.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

muzzle {
pass {
group = "software.amazon.awssdk"
Expand All @@ -11,10 +14,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"

apply plugin: 'org.unbroken-dome.test-sets'

testSets {
latestDepTest
}
Expand Down
6 changes: 2 additions & 4 deletions instrumentation/cassandra-3.0/cassandra-3.0.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ext {
cassandraDriverTestVersions = "[3.0,4.0)"
}

apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

muzzle {

Expand Down Expand Up @@ -35,10 +37,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"

apply plugin: 'org.unbroken-dome.test-sets'

testSets {
latestDepTest {
dirName = 'test'
Expand Down
3 changes: 1 addition & 2 deletions instrumentation/cdi-testing/cdi-testing.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply from: "${rootDir}/gradle/java.gradle"

apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

testSets {
Expand Down
3 changes: 1 addition & 2 deletions instrumentation/couchbase-2.0/couchbase-2.0.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/java.gradle"

apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

testSets {
Expand Down
3 changes: 1 addition & 2 deletions instrumentation/couchbase-2.6/couchbase-2.6.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/java.gradle"

apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

testSets {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply from: "${rootDir}/gradle/java.gradle"
apply from: "${rootDir}/gradle/instrumentation.gradle"

//apply plugin: 'org.unbroken-dome.test-sets'
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
apply from: "${rootDir}/gradle/instrumentation.gradle"

muzzle {
pass {
group = 'io.dropwizard'
Expand All @@ -6,8 +8,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"

dependencies {
compileOnly group: 'io.dropwizard', name: 'dropwizard-views', version: '0.7.0'

Expand Down
2 changes: 1 addition & 1 deletion instrumentation/elasticsearch/elasticsearch.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apply from: "${rootDir}/gradle/java.gradle"
apply from: "${rootDir}/gradle/instrumentation.gradle"

dependencies {
compileOnly group: 'org.elasticsearch.client', name: 'rest', version: '5.0.0'
Expand Down
7 changes: 3 additions & 4 deletions instrumentation/elasticsearch/rest-5.0/rest-5.0.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

muzzle {
pass {
group = "org.elasticsearch.client"
Expand All @@ -18,10 +21,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"

apply plugin: 'org.unbroken-dome.test-sets'

testSets {
latestDepTest
}
Expand Down
7 changes: 3 additions & 4 deletions instrumentation/elasticsearch/rest-6.4/rest-6.4.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

muzzle {
pass {
group = "org.elasticsearch.client"
Expand All @@ -19,10 +22,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"

apply plugin: 'org.unbroken-dome.test-sets'

testSets {
latestDepTest
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ext {
maxJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

muzzle {
pass {
group = "org.elasticsearch"
Expand All @@ -13,10 +16,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"

apply plugin: 'org.unbroken-dome.test-sets'

testSets {
latestDepTest
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/instrumentation.gradle"

muzzle {
pass {
group = "org.elasticsearch.client"
Expand All @@ -19,8 +21,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"

dependencies {
compileOnly group: 'org.elasticsearch.client', name: 'transport', version: '5.0.0'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

muzzle {
pass {
group = "org.elasticsearch.client"
Expand All @@ -19,10 +22,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"

apply plugin: 'org.unbroken-dome.test-sets'

testSets {
latestDepTest {
dirName = 'test'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

muzzle {
pass {
group = "org.elasticsearch.client"
Expand All @@ -19,10 +22,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"

apply plugin: 'org.unbroken-dome.test-sets'

testSets {
latestDepTest {
dirName = 'test'
Expand Down
3 changes: 1 addition & 2 deletions instrumentation/finatra-2.9/finatra-2.9.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
}

apply from: "${rootDir}/gradle/java.gradle"
apply from: "${rootDir}/gradle/instrumentation.gradle"
apply from: "${rootDir}/gradle/test-with-scala.gradle"

apply plugin: 'org.unbroken-dome.test-sets'

testSets {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
apply from: "${rootDir}/gradle/instrumentation.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

muzzle {
pass {
group = "com.google.http-client"
Expand All @@ -8,9 +11,6 @@ muzzle {
}
}

apply from: "${rootDir}/gradle/java.gradle"
apply plugin: 'org.unbroken-dome.test-sets'

testSets {
latestDepTest {
dirName = 'test'
Expand Down
Loading