Skip to content

Commit

Permalink
Merge branch '1.8.x' into 1.9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
shakuzen committed Sep 7, 2022
2 parents e1148f0 + b86d5b5 commit 71bad06
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: "Validate Gradle Wrapper"
on: [push, pull_request]

permissions:
contents: read

jobs:
validation:
name: "Validation"
Expand Down
76 changes: 76 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ buildscript {
classpath 'io.spring.nohttp:nohttp-gradle:0.0.10'
classpath 'org.gradle:test-retry-gradle-plugin:1.4.1'
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.4.0'
classpath 'de.undercouch:gradle-download-task:5.0.2'
classpath 'io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.34'

constraints {
Expand Down Expand Up @@ -293,6 +295,80 @@ subprojects {
from "$rootDir/NOTICE"
}
}

apply plugin: 'me.champeau.gradle.japicmp'
apply plugin: 'de.undercouch.download'

task downloadBaseline(type: Download) {
onlyIf {
if (project.gradle.startParameter.isOffline()) {
println 'Offline: skipping downloading of baseline and JAPICMP'
return false
} else if (compatibleVersion == 'SKIP') {
println 'SKIP: Instructed to skip the baseline comparison'
return false
} else {
println "Will download and perform baseline comparison with ${compatibleVersion}"
return true
}
}

onlyIfNewer true
compress true
String rootUrl
if (compatibleVersion.contains('-M') || compatibleVersion.contains('-RC')) {
rootUrl = 'https://repo.spring.io/milestone/'
} else if (compatibleVersion.contains('-SNAPSHOT') ) {
rootUrl = 'https://repo.spring.io/snapshot/'
} else {
rootUrl = repositories.mavenCentral().url
}

src "${rootUrl}io/micrometer/${project.name}/${compatibleVersion}/${project.name}-${compatibleVersion}.jar"
dest "${buildDir}/baselineLibs/${project.name}-${compatibleVersion}.jar"
}

task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask) {
oldClasspath.from(files("${buildDir}/baselineLibs/${project.name}-${compatibleVersion}.jar"))
newClasspath.from(files(jar.archiveFile, project(":${project.name}").jar))
onlyBinaryIncompatibleModified = true
failOnModification = true
failOnSourceIncompatibility = true
txtOutputFile = file("${project.buildDir}/reports/japi.txt")
ignoreMissingClasses = true
includeSynthetic = true

packageExcludes = ['io.micrometer.shaded.*', 'io.micrometer.statsd.internal']

// For 1.8.x branch only.
classExcludes = ['io.micrometer.core.instrument.util.JsonUtils']

// TODO remove methodExcludes when gh-3181 is resolved
methodExcludes = ['io.micrometer.stackdriver.StackdriverConfig#metricTypePrefix()',
'io.micrometer.core.instrument.Timer#record(java.util.function.BooleanSupplier)',
'io.micrometer.core.instrument.Timer#record(java.util.function.IntSupplier)',
'io.micrometer.core.instrument.Timer#record(java.util.function.LongSupplier)',
'io.micrometer.core.instrument.Timer#record(java.util.function.DoubleSupplier)',
'io.micrometer.core.instrument.LongTaskTimer#record(java.util.function.BooleanSupplier)',
'io.micrometer.core.instrument.LongTaskTimer#record(java.util.function.IntSupplier)',
'io.micrometer.core.instrument.LongTaskTimer#record(java.util.function.LongSupplier)',
'io.micrometer.core.instrument.LongTaskTimer#record(java.util.function.DoubleSupplier)',
'io.micrometer.signalfx.SignalFxConfig#publishDeltaHistogram()',

// For 1.8.x branch only.
'io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider#commandStarted(com.mongodb.event.CommandStartedEvent)',
'io.micrometer.dynatrace.DynatraceConfig#apiVersion()',
'io.micrometer.dynatrace.DynatraceConfig#defaultDimensions()',
'io.micrometer.dynatrace.DynatraceConfig#enrichWithDynatraceMetadata()',
'io.micrometer.dynatrace.DynatraceConfig#metricKeyPrefix()',
'io.micrometer.elastic.ElasticConfig#apiKeyCredentials()',
'io.micrometer.stackdriver.StackdriverConfig#useSemanticMetricTypes()'
]
onlyIf { compatibleVersion != 'SKIP' }
}

tasks.japicmp.dependsOn(downloadBaseline)
tasks.check.dependsOn(japicmp)
}

contacts {
Expand Down
12 changes: 12 additions & 0 deletions buildscript-gradle.lockfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ org.gradle.jvmargs=-Xmx1g
org.gradle.parallel=true
org.gradle.vfs.watch=true

compatibleVersion=1.7.12

nebula.dependencyLockPluginEnabled=false

0 comments on commit 71bad06

Please sign in to comment.