Skip to content

Commit

Permalink
Initial changes for renaming package and artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
Ranbir Kumar committed Jun 16, 2024
1 parent 4947475 commit 45c0d2d
Show file tree
Hide file tree
Showing 84 changed files with 70 additions and 78 deletions.
18 changes: 6 additions & 12 deletions lang/java/gradle-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Seeking New Maintainer

For more details, see [the discussion](https://github.com/davidmc24/gradle-avro-plugin/discussions/208).

If no new maintainer is found, this project will be archived on October 22, 2023 (the 10 year anniversary of this project's first public commit).

# Overview

This is a [Gradle](http://www.gradle.org/) plugin to allow easily performing Java code generation for [Apache Avro](http://avro.apache.org/). It supports JSON schema declaration files, JSON protocol declaration files, and Avro IDL files.
Expand Down Expand Up @@ -277,8 +271,8 @@ dependencies {
avro {
conversionsAndTypeFactoriesClasspath.from(configurations.customConversions)
logicalTypeFactoryClassNames.put("timezone", "com.github.davidmc24.gradle.plugin.avro.test.custom.TimeZoneLogicalTypeFactory")
customConversionClassNames.add("com.github.davidmc24.gradle.plugin.avro.test.custom.TimeZoneConversion")
logicalTypeFactoryClassNames.put("timezone", "test.java.org.apache.avro.test.custom.TimeZoneLogicalTypeFactory")
customConversionClassNames.add("test.java.org.apache.avro.test.custom.TimeZoneConversion")
}
```

Expand All @@ -296,7 +290,7 @@ In this case, use the `com.github.davidmc24.gradle.plugin.avro-base` plugin inst
Here's a short example of what this might look like:

```groovy
import com.github.davidmc24.gradle.plugin.avro.GenerateAvroJavaTask
import main.java.org.apache.avro.GenerateAvroJavaTask
apply plugin: "java"
apply plugin: "com.github.davidmc24.gradle.plugin.avro-base"
Expand Down Expand Up @@ -430,7 +424,7 @@ If desired, you can generate JSON schema with dependencies resolved.
Example build:

```groovy
import com.github.davidmc24.gradle.plugin.avro.ResolveAvroDependenciesTask
import main.java.org.apache.avro.ResolveAvroDependenciesTask
apply plugin: "com.github.davidmc24.gradle.plugin.avro-base"
Expand All @@ -450,8 +444,8 @@ From IDL files, first use `GenerateAvroProtocolTask` to convert the IDL files to
Example using base plugin with support for both IDL and JSON protocol files in `src/main/avro`:

```groovy
import com.github.davidmc24.gradle.plugin.avro.GenerateAvroProtocolTask
import com.github.davidmc24.gradle.plugin.avro.GenerateAvroSchemaTask
import main.java.org.apache.avro.GenerateAvroProtocolTask
import main.java.org.apache.avro.GenerateAvroSchemaTask
apply plugin: "com.github.davidmc24.gradle.plugin.avro-base"
Expand Down
10 changes: 5 additions & 5 deletions lang/java/gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ plugins {
// Thus, for now, no coverage reporting, as I place a higher value on testing configuration cache
// support.

group = "com.github.davidmc24.gradle.plugin"
group = "org.apache.avro"
version = "1.7.2-SNAPSHOT"

def isCI = System.getenv("CI") == "true"
Expand Down Expand Up @@ -142,14 +142,14 @@ signing {
gradlePlugin {
plugins {
avro {
id = "com.github.davidmc24.gradle.plugin.avro"
implementationClass = "com.github.davidmc24.gradle.plugin.avro.AvroPlugin"
id = "org.apache.gradle.plugin.avro"
implementationClass = "org.apache.avro.AvroPlugin"
displayName = "avro"
description = "Conventions plugin for gradle-avro-plugin"
}
avroBase {
id = "com.github.davidmc24.gradle.plugin.avro-base"
implementationClass = "com.github.davidmc24.gradle.plugin.avro.AvroBasePlugin"
id = "org.apache.gradle.plugin.avro-base"
implementationClass = "org.apache.avro.AvroBasePlugin"
displayName = "avro-base"
description = "Capabilities plugin for gradle-avro-plugin"
}
Expand Down
4 changes: 2 additions & 2 deletions lang/java/gradle-plugin/config/checkstyle/import-control.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE import-control PUBLIC
"-//Checkstyle//DTD ImportControl Configuration 1.4//EN"
"https://checkstyle.org/dtds/import_control_1_4.dtd">
<import-control pkg="com.github.davidmc24.gradle.plugin.avro">
<allow pkg="com.github.davidmc24.gradle.plugin.avro"/>
<import-control pkg="org.apache.avro">
<allow pkg="org.apache.avro"/>

<allow pkg="java.io"/>
<allow pkg="java.lang"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import org.gradle.api.Plugin;
import org.gradle.api.Project;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import org.apache.avro.Conversion;
import org.apache.avro.LogicalTypes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.io.File;
import java.io.FileFilter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.util.Collections;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.nio.charset.Charset;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.io.File;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.io.File;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.io.File;
import java.io.FileOutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

/**
* General filename and filepath manipulation utilities.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.io.File;
import java.io.IOException;
Expand All @@ -34,8 +34,6 @@
import org.gradle.api.tasks.Classpath;
import org.gradle.api.tasks.TaskAction;

import static com.github.davidmc24.gradle.plugin.avro.Constants.IDL_EXTENSION;

/**
* Task to convert Avro IDL files into Avro protocol files using {@link Idl}.
*/
Expand Down Expand Up @@ -72,7 +70,7 @@ protected void process() {
}

private void failOnUnsupportedFiles() {
FileCollection unsupportedFiles = filterSources(new NotSpec<>(new FileExtensionSpec(IDL_EXTENSION)));
FileCollection unsupportedFiles = filterSources(new NotSpec<>(new FileExtensionSpec(Constants.IDL_EXTENSION)));
if (!unsupportedFiles.isEmpty()) {
throw new GradleException(
String.format("Unsupported file extension for the following files: %s", unsupportedFiles));
Expand All @@ -82,7 +80,7 @@ private void failOnUnsupportedFiles() {
private void processFiles() {
int processedFileCount = 0;
ClassLoader loader = assembleClassLoader();
for (File sourceFile : filterSources(new FileExtensionSpec(IDL_EXTENSION))) {
for (File sourceFile : filterSources(new FileExtensionSpec(Constants.IDL_EXTENSION))) {
processIDLFile(sourceFile, loader);
processedFileCount++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.io.File;
import java.lang.reflect.InvocationTargetException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import org.gradle.util.GradleVersion;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import org.gradle.util.GradleVersion;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.util.LinkedHashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.io.File;
import javax.annotation.Nonnull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.io.File;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.util.Collection;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

/**
* Utility methods for working with {@link String}s.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro;
package main.java.org.apache.avro;

import java.util.Set;
import java.util.TreeSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro
package test.groovy.org.apache.avro

import com.github.davidmc24.gradle.plugin.avro.test.custom.CommentGenerator
import com.github.davidmc24.gradle.plugin.avro.test.custom.TimestampGenerator
import test.java.org.apache.avro.test.custom.CommentGenerator
import test.java.org.apache.avro.test.custom.TimestampGenerator

import static org.gradle.testkit.runner.TaskOutcome.SUCCESS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro
package test.groovy.org.apache.avro

import static org.gradle.testkit.runner.TaskOutcome.FAILED
import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro
package test.groovy.org.apache.avro

import org.gradle.api.Project
import org.gradle.testfixtures.ProjectBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.davidmc24.gradle.plugin.avro
package test.groovy.org.apache.avro

import org.apache.avro.Protocol
import org.apache.avro.Schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro
package test.groovy.org.apache.avro

import spock.lang.IgnoreIf
import spock.util.environment.OperatingSystem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.davidmc24.gradle.plugin.avro
package test.groovy.org.apache.avro

import static org.gradle.testkit.runner.TaskOutcome.SUCCESS

Expand Down
Loading

0 comments on commit 45c0d2d

Please sign in to comment.