Update Gradle and build dependencies. (#4026)
This commit is contained in:
		
							parent
							
								
									34dc74f220
								
							
						
					
					
						commit
						905c1ffa4f
					
				|  | @ -9,19 +9,19 @@ repositories { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| dependencies { | dependencies { | ||||||
|   implementation("com.diffplug.spotless:spotless-plugin-gradle:6.0.4") |   implementation("com.diffplug.spotless:spotless-plugin-gradle:6.0.5") | ||||||
|   // Needed for japicmp but not automatically brought in for some reason. |   // Needed for japicmp but not automatically brought in for some reason. | ||||||
|   implementation("com.google.guava:guava:31.0.1-jre") |   implementation("com.google.guava:guava:31.0.1-jre") | ||||||
|   implementation("com.squareup:javapoet:1.13.0") |   implementation("com.squareup:javapoet:1.13.0") | ||||||
|   implementation("com.squareup.wire:wire-compiler:3.7.0") |   implementation("com.squareup.wire:wire-compiler:4.0.1") | ||||||
|   implementation("com.squareup.wire:wire-gradle-plugin:3.7.0") |   implementation("com.squareup.wire:wire-gradle-plugin:4.0.1") | ||||||
|   implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.18") |   implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.18") | ||||||
|   implementation("gradle.plugin.io.morethan.jmhreport:gradle-jmh-report:0.9.0") |   implementation("gradle.plugin.io.morethan.jmhreport:gradle-jmh-report:0.9.0") | ||||||
|   implementation("me.champeau.gradle:japicmp-gradle-plugin:0.3.0") |   implementation("me.champeau.gradle:japicmp-gradle-plugin:0.3.0") | ||||||
|   implementation("me.champeau.jmh:jmh-gradle-plugin:0.6.6") |   implementation("me.champeau.jmh:jmh-gradle-plugin:0.6.6") | ||||||
|   implementation("net.ltgt.gradle:gradle-errorprone-plugin:2.0.2") |   implementation("net.ltgt.gradle:gradle-errorprone-plugin:2.0.2") | ||||||
|   implementation("net.ltgt.gradle:gradle-nullaway-plugin:1.2.0") |   implementation("net.ltgt.gradle:gradle-nullaway-plugin:1.2.0") | ||||||
|   implementation("ru.vyarus:gradle-animalsniffer-plugin:1.5.3") |   implementation("ru.vyarus:gradle-animalsniffer-plugin:1.5.4") | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // We can't apply conventions to this build so include important ones such as the Java compilation | // We can't apply conventions to this build so include important ones such as the Java compilation | ||||||
|  |  | ||||||
|  | @ -20,9 +20,9 @@ import com.squareup.wire.schema.Service | ||||||
| import com.squareup.wire.schema.Target | import com.squareup.wire.schema.Target | ||||||
| import com.squareup.wire.schema.Type | import com.squareup.wire.schema.Type | ||||||
| import okio.IOException | import okio.IOException | ||||||
| import java.nio.file.FileSystem | import okio.FileSystem | ||||||
| import java.nio.file.Files | import okio.Path | ||||||
| import java.nio.file.Path | import okio.Path.Companion.toPath | ||||||
| import javax.lang.model.element.Modifier.FINAL | import javax.lang.model.element.Modifier.FINAL | ||||||
| import javax.lang.model.element.Modifier.PUBLIC | import javax.lang.model.element.Modifier.PUBLIC | ||||||
| import javax.lang.model.element.Modifier.STATIC | import javax.lang.model.element.Modifier.STATIC | ||||||
|  | @ -41,12 +41,12 @@ class ProtoFieldsWireHandler : CustomHandlerBeta { | ||||||
|     logger: WireLogger, |     logger: WireLogger, | ||||||
|     profileLoader: ProfileLoader |     profileLoader: ProfileLoader | ||||||
|   ): Target.SchemaHandler { |   ): Target.SchemaHandler { | ||||||
|     val modulePath = fs.getPath(outDirectory) |     val modulePath = outDirectory.toPath() | ||||||
|     Files.createDirectories(modulePath) |     fs.createDirectories(modulePath) | ||||||
|     val javaGenerator = JavaGenerator.get(schema) |     val javaGenerator = JavaGenerator.get(schema) | ||||||
| 
 | 
 | ||||||
|     return object : Target.SchemaHandler { |     return object : Target.SchemaHandler { | ||||||
|       override fun handle(extend: Extend, field: Field) = null |       override fun handle(extend: Extend, field: Field): Path? = null | ||||||
|       override fun handle(service: Service): List<Path> = emptyList() |       override fun handle(service: Service): List<Path> = emptyList() | ||||||
|       override fun handle(type: Type): Path? { |       override fun handle(type: Type): Path? { | ||||||
|         val typeSpec = javaGenerator.generateType(type, false) |         val typeSpec = javaGenerator.generateType(type, false) | ||||||
|  | @ -60,12 +60,18 @@ class ProtoFieldsWireHandler : CustomHandlerBeta { | ||||||
|           .addFileComment("\$L", WireCompiler.CODE_GENERATED_BY_WIRE) |           .addFileComment("\$L", WireCompiler.CODE_GENERATED_BY_WIRE) | ||||||
|           .addFileComment("\nSource: \$L in \$L", type.type, type.location.withPathOnly()) |           .addFileComment("\nSource: \$L in \$L", type.type, type.location.withPathOnly()) | ||||||
|           .build() |           .build() | ||||||
|         val generatedFilePath = modulePath.resolve(javaFile.packageName) |         val generatedFilePath = modulePath / javaFile.packageName / "${javaFile.typeSpec.name}.java" | ||||||
|           .resolve("${javaFile.typeSpec.name}.java") | 
 | ||||||
|  |         val filePath = modulePath / | ||||||
|  |           javaFile.packageName.replace(".", "/") / | ||||||
|  |           "${javaTypeName.simpleName()}.java" | ||||||
| 
 | 
 | ||||||
|         logger.artifact(modulePath, javaFile) |         logger.artifact(modulePath, javaFile) | ||||||
|         try { |         try { | ||||||
|           javaFile.writeTo(modulePath) |           fs.createDirectories(filePath.parent!!) | ||||||
|  |           fs.write(filePath) { | ||||||
|  |             writeUtf8(javaFile.toString()) | ||||||
|  |           } | ||||||
|         } catch (e: IOException) { |         } catch (e: IOException) { | ||||||
|           throw IOException("Error emitting ${javaFile.packageName}.${javaFile.typeSpec.name} " + |           throw IOException("Error emitting ${javaFile.packageName}.${javaFile.typeSpec.name} " + | ||||||
|             "to $outDirectory", e) |             "to $outDirectory", e) | ||||||
|  |  | ||||||
|  | @ -1,2 +1,10 @@ | ||||||
| Comparing source compatibility of  against  | Comparing source compatibility of  against  | ||||||
| No changes. | ===  UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.extension.kotlin.ContextExtensionsKt  (not serializable) | ||||||
|  | 	===  CLASS FILE FORMAT VERSION: 52.0 <- 52.0 | ||||||
|  | 	***  MODIFIED ANNOTATION: kotlin.Metadata | ||||||
|  | 		---  REMOVED ELEMENT: bv=1,0,3 (-) | ||||||
|  | 		***  MODIFIED ELEMENT: mv=1,5,1 (<- 1,4,0) | ||||||
|  | 		===  UNCHANGED ELEMENT: k=2 | ||||||
|  | 		===  UNCHANGED ELEMENT: d1=<3D><>
<3B>
<3B><><EFBFBD>
<3B><><EFBFBD>
<3B><><EFBFBD>
<3B><><EFBFBD><EFBFBD>
<3B><><EFBFBD><EFBFBD>0<EFBFBD>*<2A>0<EFBFBD><30>
<3B><><EFBFBD><EFBFBD>0<EFBFBD>*<2A>0<EFBFBD><30>
<3B><><EFBFBD><EFBFBD>0<EFBFBD>*<2A>0<EFBFBD>¨<EFBFBD><C2A8> | ||||||
|  | 		===  UNCHANGED ELEMENT: d2=asContextElement,Lkotlin/coroutines/CoroutineContext;,Lio/opentelemetry/context/Context;,Lio/opentelemetry/context/ImplicitContextKeyed;,getOpenTelemetryContext,opentelemetry-extension-kotlin | ||||||
|  | 		+++  NEW ELEMENT: xi=48 (+) | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| distributionBase=GRADLE_USER_HOME | distributionBase=GRADLE_USER_HOME | ||||||
| distributionPath=wrapper/dists | distributionPath=wrapper/dists | ||||||
| distributionSha256Sum=9afb3ca688fc12c761a0e9e4321e4d24e977a4a8916c8a768b1fe05ddb4d6b66 | distributionSha256Sum=b586e04868a22fd817c8971330fec37e298f3242eb85c374181b12d637f80302 | ||||||
| distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip | ||||||
| zipStoreBase=GRADLE_USER_HOME | zipStoreBase=GRADLE_USER_HOME | ||||||
| zipStorePath=wrapper/dists | zipStorePath=wrapper/dists | ||||||
|  | @ -41,3 +41,9 @@ wire { | ||||||
|     customHandlerClass = "io.opentelemetry.gradle.ProtoFieldsWireHandler" |     customHandlerClass = "io.opentelemetry.gradle.ProtoFieldsWireHandler" | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | tasks { | ||||||
|  |   compileJava { | ||||||
|  |     source("$buildDir/generated/source/wire") | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @ -67,3 +67,9 @@ wire { | ||||||
|     customHandlerClass = "io.opentelemetry.gradle.ProtoFieldsWireHandler" |     customHandlerClass = "io.opentelemetry.gradle.ProtoFieldsWireHandler" | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | tasks { | ||||||
|  |   compileJava { | ||||||
|  |     source("$buildDir/generated/source/wire") | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @ -1,6 +1,6 @@ | ||||||
| distributionBase=GRADLE_USER_HOME | distributionBase=GRADLE_USER_HOME | ||||||
| distributionPath=wrapper/dists | distributionPath=wrapper/dists | ||||||
| distributionSha256Sum=9afb3ca688fc12c761a0e9e4321e4d24e977a4a8916c8a768b1fe05ddb4d6b66 | distributionSha256Sum=b586e04868a22fd817c8971330fec37e298f3242eb85c374181b12d637f80302 | ||||||
| distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip | ||||||
| zipStoreBase=GRADLE_USER_HOME | zipStoreBase=GRADLE_USER_HOME | ||||||
| zipStorePath=wrapper/dists | zipStorePath=wrapper/dists | ||||||
|  | @ -1,12 +1,12 @@ | ||||||
| pluginManagement { | pluginManagement { | ||||||
|   plugins { |   plugins { | ||||||
|     id("com.github.ben-manes.versions") version "0.39.0" |     id("com.github.ben-manes.versions") version "0.39.0" | ||||||
|     id("com.github.johnrengelman.shadow") version "7.1.0" |     id("com.github.johnrengelman.shadow") version "7.1.1" | ||||||
|     id("com.gradle.enterprise") version "3.7.2" |     id("com.gradle.enterprise") version "3.8" | ||||||
|     id("de.undercouch.download") version "4.1.2" |     id("de.undercouch.download") version "4.1.2" | ||||||
|     id("io.github.gradle-nexus.publish-plugin") version "1.1.0" |     id("io.github.gradle-nexus.publish-plugin") version "1.1.0" | ||||||
|     id("nebula.release") version "16.0.0" |     id("nebula.release") version "16.0.0" | ||||||
|     id("org.jetbrains.kotlin.jvm") version "1.6.0" |     id("org.jetbrains.kotlin.jvm") version "1.6.10" | ||||||
|     id("org.unbroken-dome.test-sets") version "4.0.0" |     id("org.unbroken-dome.test-sets") version "4.0.0" | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue