From d2cf52af5fc2c0a08cc2b6dbe1689f41348fbdad Mon Sep 17 00:00:00 2001 From: Ranbir Kumar Date: Fri, 28 Jun 2024 10:54:00 -0700 Subject: [PATCH] Fix package reference in groovy test --- .../avsc-from-subproject/cat/build.gradle | 2 +- .../avsc-from-subproject/schema/build.gradle | 2 +- .../buildSrc/build.gradle | 2 +- .../java/custom/AvroConventionPlugin.java | 4 ++-- .../avro/AvroBasePluginFunctionalSpec.groovy | 22 +++++++++---------- .../BuildCacheSupportFunctionalSpec.groovy | 2 +- .../apache/avro/EncodingFunctionalSpec.groovy | 2 +- .../org/apache/avro/FunctionalSpec.groovy | 4 ++-- ...erateAvroProtocolTaskFunctionalSpec.groovy | 2 +- ...otlinDSLCompatibilityFunctionalSpec.groovy | 2 +- .../apache/avro/OptionsFunctionalSpec.groovy | 12 +++++----- ...eAvroDependenciesTaskFunctionalSpec.groovy | 2 +- .../org/apache/avro/SchemaResolverSpec.groovy | 14 ++++++------ .../test-project-kotlin/build.gradle.kts | 2 +- .../gradle-plugin/test-project/build.gradle | 2 +- 15 files changed, 38 insertions(+), 38 deletions(-) diff --git a/lang/java/gradle-plugin/examples/avsc-from-subproject/cat/build.gradle b/lang/java/gradle-plugin/examples/avsc-from-subproject/cat/build.gradle index 8984807202b..a477827053f 100644 --- a/lang/java/gradle-plugin/examples/avsc-from-subproject/cat/build.gradle +++ b/lang/java/gradle-plugin/examples/avsc-from-subproject/cat/build.gradle @@ -1,7 +1,7 @@ import java.util.zip.ZipFile plugins { - id "com.github.davidmc24.gradle.plugin.avro" version "1.2.1" + id "org.apache.gradle.plugin.avro" version "1.2.1" } repositories { diff --git a/lang/java/gradle-plugin/examples/avsc-from-subproject/schema/build.gradle b/lang/java/gradle-plugin/examples/avsc-from-subproject/schema/build.gradle index de7e12dcadd..8169f6ba5cb 100644 --- a/lang/java/gradle-plugin/examples/avsc-from-subproject/schema/build.gradle +++ b/lang/java/gradle-plugin/examples/avsc-from-subproject/schema/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.github.davidmc24.gradle.plugin.avro" version "1.2.1" + id "org.apache.gradle.plugin.avro" version "1.2.1" } repositories { diff --git a/lang/java/gradle-plugin/examples/default-custom-types/buildSrc/build.gradle b/lang/java/gradle-plugin/examples/default-custom-types/buildSrc/build.gradle index b55abe34eb0..5026c6e42bb 100644 --- a/lang/java/gradle-plugin/examples/default-custom-types/buildSrc/build.gradle +++ b/lang/java/gradle-plugin/examples/default-custom-types/buildSrc/build.gradle @@ -3,6 +3,6 @@ repositories { } dependencies { - implementation 'com.github.davidmc24.gradle.plugin:gradle-avro-plugin:1.2.0' + implementation 'org.apache.gradle.plugin:gradle-avro-plugin:1.2.0' implementation 'org.apache.avro:avro:1.11.0' } diff --git a/lang/java/gradle-plugin/examples/default-custom-types/buildSrc/src/main/java/custom/AvroConventionPlugin.java b/lang/java/gradle-plugin/examples/default-custom-types/buildSrc/src/main/java/custom/AvroConventionPlugin.java index 40734d866e7..16932e5603c 100644 --- a/lang/java/gradle-plugin/examples/default-custom-types/buildSrc/src/main/java/custom/AvroConventionPlugin.java +++ b/lang/java/gradle-plugin/examples/default-custom-types/buildSrc/src/main/java/custom/AvroConventionPlugin.java @@ -2,8 +2,8 @@ import org.gradle.api.Plugin; import org.gradle.api.Project; -import com.github.davidmc24.gradle.plugin.avro.AvroPlugin; -import com.github.davidmc24.gradle.plugin.avro.AvroExtension; +import org.apache.avro.AvroPlugin; +import org.apache.avro.AvroExtension; public class AvroConventionPlugin implements Plugin { public void apply(Project project) { diff --git a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/AvroBasePluginFunctionalSpec.groovy b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/AvroBasePluginFunctionalSpec.groovy index 8176eac8019..7827f8deb59 100644 --- a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/AvroBasePluginFunctionalSpec.groovy +++ b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/AvroBasePluginFunctionalSpec.groovy @@ -28,7 +28,7 @@ class AvroBasePluginFunctionalSpec extends FunctionalSpec { def "can generate java files from json schema"() { given: buildFile << """ - |tasks.register("generateAvroJava", com.github.davidmc24.gradle.plugin.avro.GenerateAvroJavaTask) { + |tasks.register("generateAvroJava", org.apache.avro.GenerateAvroJavaTask) { | source file("src/main/avro") | include("**/*.avsc") | outputDir = file("build/generated-main-avro-java") @@ -48,7 +48,7 @@ class AvroBasePluginFunctionalSpec extends FunctionalSpec { def "can generate json schema files from json protocol"() { given: buildFile << """ - |tasks.register("generateSchema", com.github.davidmc24.gradle.plugin.avro.GenerateAvroSchemaTask) { + |tasks.register("generateSchema", org.apache.avro.GenerateAvroSchemaTask) { | source file("src/main/avro") | include("**/*.avpr") | outputDir = file("build/generated-main-avro-avsc") @@ -70,11 +70,11 @@ class AvroBasePluginFunctionalSpec extends FunctionalSpec { def "can generate json schema files from IDL"() { given: buildFile << """ - |tasks.register("generateProtocol", com.github.davidmc24.gradle.plugin.avro.GenerateAvroProtocolTask) { + |tasks.register("generateProtocol", org.apache.avro.GenerateAvroProtocolTask) { | source file("src/main/avro") | outputDir = file("build/generated-avro-main-avpr") |} - |tasks.register("generateSchema", com.github.davidmc24.gradle.plugin.avro.GenerateAvroSchemaTask) { + |tasks.register("generateSchema", org.apache.avro.GenerateAvroSchemaTask) { | dependsOn generateProtocol | source file("build/generated-avro-main-avpr") | include("**/*.avpr") @@ -99,12 +99,12 @@ class AvroBasePluginFunctionalSpec extends FunctionalSpec { def "example of converting both IDL and json protocol simultaneously"() { given: buildFile << """ - |tasks.register("generateProtocol", com.github.davidmc24.gradle.plugin.avro.GenerateAvroProtocolTask) { + |tasks.register("generateProtocol", org.apache.avro.GenerateAvroProtocolTask) { | source file("src/main/avro") | include("**/*.avdl") | outputDir = file("build/generated-avro-main-avpr") |} - |tasks.register("generateSchema", com.github.davidmc24.gradle.plugin.avro.GenerateAvroSchemaTask) { + |tasks.register("generateSchema", org.apache.avro.GenerateAvroSchemaTask) { | dependsOn generateProtocol | source file("src/main/avro") | source file("build/generated-avro-main-avpr") @@ -139,15 +139,15 @@ class AvroBasePluginFunctionalSpec extends FunctionalSpec { buildFile << """ |avro { | templateDirectory = "${templatesDir.toString().replace('\\', '\\\\')}/" - | additionalVelocityToolClasses = ['com.github.davidmc24.gradle.plugin.avro.test.custom.TimestampGenerator', - | 'com.github.davidmc24.gradle.plugin.avro.test.custom.CommentGenerator'] + | additionalVelocityToolClasses = ['org.apache.avro.test.custom.TimestampGenerator', + | 'org.apache.avro.test.custom.CommentGenerator'] |} |tasks.register("compileTools", JavaCompile) { | source = sourceSets.main.java | classpath = sourceSets.main.compileClasspath | destinationDir = file("build/classes/java/main") |} - |tasks.register("generateAvro", com.github.davidmc24.gradle.plugin.avro.GenerateAvroJavaTask) { + |tasks.register("generateAvro", org.apache.avro.GenerateAvroJavaTask) { | dependsOn compileTools | classpath = files("build/classes/java/main") | source file("src/main/avro") @@ -170,8 +170,8 @@ class AvroBasePluginFunctionalSpec extends FunctionalSpec { private void copyAvroTools(String destDir) { copyFile("src/test/java", destDir, - "com/github/davidmc24/gradle/plugin/avro/test/custom/CommentGenerator.java") + "org/apache/avro/test/custom/CommentGenerator.java") copyFile("src/test/java", destDir, - "com/github/davidmc24/gradle/plugin/avro/test/custom/TimestampGenerator.java") + "org/apache/avro/test/custom/TimestampGenerator.java") } } diff --git a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/BuildCacheSupportFunctionalSpec.groovy b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/BuildCacheSupportFunctionalSpec.groovy index 5f433cd6b72..c0a84311eee 100644 --- a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/BuildCacheSupportFunctionalSpec.groovy +++ b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/BuildCacheSupportFunctionalSpec.groovy @@ -80,7 +80,7 @@ class BuildCacheSupportFunctionalSpec extends FunctionalSpec { given: "a project is built once with build cache enabled" copyResource("mail.avpr", avroDir) buildFile << """ - |tasks.register("generateSchema", com.github.davidmc24.gradle.plugin.avro.GenerateAvroSchemaTask) { + |tasks.register("generateSchema", org.apache.avro.GenerateAvroSchemaTask) { | source file("src/main/avro") | include("**/*.avpr") | outputDir = file("build/generated-main-avro-avsc") diff --git a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/EncodingFunctionalSpec.groovy b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/EncodingFunctionalSpec.groovy index 38f26fb87e9..5f9fcc0c8e4 100644 --- a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/EncodingFunctionalSpec.groovy +++ b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/EncodingFunctionalSpec.groovy @@ -84,7 +84,7 @@ class EncodingFunctionalSpec extends FunctionalSpec { |avro { | outputCharacterEncoding = ${outputCharacterEncoding} |} - |tasks.register("generateAvroJava", com.github.davidmc24.gradle.plugin.avro.GenerateAvroJavaTask) { + |tasks.register("generateAvroJava", org.apache.avro.GenerateAvroJavaTask) { | source file("src/main/avro") | include("**/*.avsc") | outputDir = file("build/generated-main-avro-java") diff --git a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/FunctionalSpec.groovy b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/FunctionalSpec.groovy index c06400935a1..d2748649bda 100644 --- a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/FunctionalSpec.groovy +++ b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/FunctionalSpec.groovy @@ -67,11 +67,11 @@ abstract class FunctionalSpec extends Specification { } protected void applyAvroPlugin() { - applyPlugin("com.github.davidmc24.gradle.plugin.avro") + applyPlugin("org.apache.gradle.plugin.avro") } protected void applyAvroBasePlugin() { - applyPlugin("com.github.davidmc24.gradle.plugin.avro-base") + applyPlugin("org.apache.gradle.plugin.avro-base") } protected void applyPlugin(String pluginId) { diff --git a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/GenerateAvroProtocolTaskFunctionalSpec.groovy b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/GenerateAvroProtocolTaskFunctionalSpec.groovy index c72842f2976..246915b1275 100644 --- a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/GenerateAvroProtocolTaskFunctionalSpec.groovy +++ b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/GenerateAvroProtocolTaskFunctionalSpec.groovy @@ -34,7 +34,7 @@ class GenerateAvroProtocolTaskFunctionalSpec extends FunctionalSpec { |dependencies { | shared sharedIdlJar.outputs.files |} - |tasks.register("generateProtocol", com.github.davidmc24.gradle.plugin.avro.GenerateAvroProtocolTask) { + |tasks.register("generateProtocol", org.apache.avro.GenerateAvroProtocolTask) { | classpath = configurations.shared | source file("src/dependent") | outputDir = file("build/protocol") diff --git a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/KotlinDSLCompatibilityFunctionalSpec.groovy b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/KotlinDSLCompatibilityFunctionalSpec.groovy index a3a511c7f3e..fe2561fa910 100644 --- a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/KotlinDSLCompatibilityFunctionalSpec.groovy +++ b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/KotlinDSLCompatibilityFunctionalSpec.groovy @@ -11,7 +11,7 @@ class KotlinDSLCompatibilityFunctionalSpec extends FunctionalSpec { kotlinBuildFile << """ |plugins { | java - | id("com.github.davidmc24.gradle.plugin.avro") + | id("org.apache.gradle.plugin.avro") |} |repositories { | mavenCentral() diff --git a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/OptionsFunctionalSpec.groovy b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/OptionsFunctionalSpec.groovy index af9ea4ee1b8..4c3a43d0f7e 100644 --- a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/OptionsFunctionalSpec.groovy +++ b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/OptionsFunctionalSpec.groovy @@ -251,7 +251,7 @@ class OptionsFunctionalSpec extends FunctionalSpec { | classpath files(["${templatesDir.parentFile.toURI()}"]) | } |} - |apply plugin: "com.github.davidmc24.gradle.plugin.avro" + |apply plugin: "org.apache.gradle.plugin.avro" |avro { | templateDirectory = "/alternateTemplates/" |} @@ -284,11 +284,11 @@ class OptionsFunctionalSpec extends FunctionalSpec { | classpath files(["${templatesDir.parentFile.toURI()}"]) | } |} - |apply plugin: "com.github.davidmc24.gradle.plugin.avro" + |apply plugin: "org.apache.gradle.plugin.avro" |avro { | templateDirectory = "/alternateTemplates/" - | additionalVelocityToolClasses = ['com.github.davidmc24.gradle.plugin.avro.test.custom.TimestampGenerator', - | 'com.github.davidmc24.gradle.plugin.avro.test.custom.CommentGenerator'] + | additionalVelocityToolClasses = ['org.apache.avro.test.custom.TimestampGenerator', + | 'org.apache.avro.test.custom.CommentGenerator'] |} |""".stripMargin() @@ -389,8 +389,8 @@ class OptionsFunctionalSpec extends FunctionalSpec { private void copyAvroTools(String destDir) { copyFile("src/test/java", destDir, - "com/github/davidmc24/gradle/plugin/avro/test/custom/CommentGenerator.java") + "org/apache/avro/test/custom/CommentGenerator.java") copyFile("src/test/java", destDir, - "com/github/davidmc24/gradle/plugin/avro/test/custom/TimestampGenerator.java") + "org/apache/avro/test/custom/TimestampGenerator.java") } } diff --git a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/ResolveAvroDependenciesTaskFunctionalSpec.groovy b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/ResolveAvroDependenciesTaskFunctionalSpec.groovy index 0bfa2c68973..3de88e9b572 100644 --- a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/ResolveAvroDependenciesTaskFunctionalSpec.groovy +++ b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/ResolveAvroDependenciesTaskFunctionalSpec.groovy @@ -15,7 +15,7 @@ class ResolveAvroDependenciesTaskFunctionalSpec extends FunctionalSpec { given: "a build with the task declared" applyAvroBasePlugin() buildFile << """ - |tasks.register("resolveAvroDependencies", com.github.davidmc24.gradle.plugin.avro.ResolveAvroDependenciesTask) { + |tasks.register("resolveAvroDependencies", org.apache.avro.ResolveAvroDependenciesTask) { | source file("src/avro/normalized") | outputDir = file("build/avro/resolved") |} diff --git a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/SchemaResolverSpec.groovy b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/SchemaResolverSpec.groovy index aa93af15fe1..8f88f7dd206 100644 --- a/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/SchemaResolverSpec.groovy +++ b/lang/java/gradle-plugin/src/test/groovy/org/apache/avro/SchemaResolverSpec.groovy @@ -109,7 +109,7 @@ class SchemaResolverSpec extends Specification { def "Duplicate record definition succeeds if definition identical"() { given: def resourceNames = ["Person.avsc", "Fish.avsc"] - def files = resourceNames.collect { new File("src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/${it}") } + def files = resourceNames.collect { new File("org/apache/avro/duplicate/${it}") } when: def processingState = resolver.resolve(files) @@ -123,7 +123,7 @@ class SchemaResolverSpec extends Specification { def "Duplicate enum definition succeeds if definition identical"() { given: def resourceNames = ["Person.avsc", "Cat.avsc"] - def files = resourceNames.collect { new File("src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/${it}") } + def files = resourceNames.collect { new File("org/apache/avro/duplicate/${it}") } when: def processingState = resolver.resolve(files) @@ -137,7 +137,7 @@ class SchemaResolverSpec extends Specification { def "Duplicate fixed definition succeeds if definition identical"() { given: def resourceNames = ["ContainsFixed1.avsc", "ContainsFixed2.avsc"] - def files = resourceNames.collect { new File("src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/${it}") } + def files = resourceNames.collect { new File("src/test/resources/org/apache/avro/duplicate/${it}") } when: def processingState = resolver.resolve(files) @@ -151,7 +151,7 @@ class SchemaResolverSpec extends Specification { def "Duplicate record definition fails if definition differs"() { given: def resourceNames = ["Person.avsc", "Spider.avsc"] - def files = resourceNames.collect { new File("src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/${it}") } + def files = resourceNames.collect { new File("src/test/resources/org/apache/avro/duplicate/${it}") } when: resolver.resolve(files) @@ -164,7 +164,7 @@ class SchemaResolverSpec extends Specification { def "Duplicate enum definition fails if definition differs"() { given: def resourceNames = ["Dog.avsc", "Person.avsc"] - def files = resourceNames.collect { new File("src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/${it}") } + def files = resourceNames.collect { new File("src/test/resources/org/apache/avro/duplicate/${it}") } when: resolver.resolve(files) @@ -177,7 +177,7 @@ class SchemaResolverSpec extends Specification { def "Duplicate fixed definition fails if definition differs"() { given: def resourceNames = ["ContainsFixed1.avsc", "ContainsFixed3.avsc"] - def files = resourceNames.collect { new File("src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/${it}") } + def files = resourceNames.collect { new File("src/test/resources/org/apache/avro/duplicate/${it}") } when: resolver.resolve(files) @@ -189,7 +189,7 @@ class SchemaResolverSpec extends Specification { def "Duplicate record definition in single file fails with clear error"() { given: - def file = new File("src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/duplicateInSingleFile.avsc") + def file = new File("src/test/resources/org/apache/avro/duplicate/duplicateInSingleFile.avsc") when: resolver.resolve([file]) diff --git a/lang/java/gradle-plugin/test-project-kotlin/build.gradle.kts b/lang/java/gradle-plugin/test-project-kotlin/build.gradle.kts index 53f4bf04a43..7b944d505a4 100644 --- a/lang/java/gradle-plugin/test-project-kotlin/build.gradle.kts +++ b/lang/java/gradle-plugin/test-project-kotlin/build.gradle.kts @@ -1,7 +1,7 @@ plugins { id("idea") id("org.apache.gradle.plugin.avro") version ("1.2.0") -// id "com.github.davidmc24.gradle.plugin.avro" version "1.2.1-SNAPSHOT" +// id "org.apache.gradle.plugin.avro" version "1.2.1-SNAPSHOT" } repositories { diff --git a/lang/java/gradle-plugin/test-project/build.gradle b/lang/java/gradle-plugin/test-project/build.gradle index ebeeb8b1b7b..d212885e344 100644 --- a/lang/java/gradle-plugin/test-project/build.gradle +++ b/lang/java/gradle-plugin/test-project/build.gradle @@ -1,7 +1,7 @@ plugins { id "idea" id "org.apache.gradle.plugin.avro" version "1.2.0" -// id "com.github.davidmc24.gradle.plugin.avro" version "1.2.1-SNAPSHOT" +// id "org.apache.gradle.plugin.avro" version "1.2.1-SNAPSHOT" } repositories {