Full Code of davidmc24/gradle-avro-plugin for AI

master ccc554ebc747 cached
189 files
461.4 KB
120.4k tokens
333 symbols
1 requests
Download .txt
Showing preview only (518K chars total). Download the full file or copy to clipboard to get everything.
Repository: davidmc24/gradle-avro-plugin
Branch: master
Commit: ccc554ebc747
Files: 189
Total size: 461.4 KB

Directory structure:
gitextract_acedqttq/

├── .editorconfig
├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── config.yml
│   └── workflows/
│       ├── avro-compatibility.yml
│       ├── ci.yml
│       ├── gradle-compatibility.yml
│       ├── gradle-wrapper-validation.yml
│       ├── java-compatibility.yml
│       ├── os-compatibility.yml
│       └── publish.yml
├── .gitignore
├── CHANGES.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── RELEASING.md
├── build.gradle
├── config/
│   ├── checkstyle/
│   │   ├── checkstyle.xml
│   │   └── import-control.xml
│   └── codenarc/
│       └── codenarc.groovy
├── design-docs/
│   ├── configurations-for-additional-schema.md
│   ├── external-schemata-and-protocols.md
│   └── run-avro-as-an-external-process.md
├── examples/
│   ├── avsc-from-external-jar/
│   │   ├── README.md
│   │   ├── build.gradle
│   │   ├── external-files/
│   │   │   ├── Breed.avsc
│   │   │   └── Cat.avsc
│   │   ├── gradle/
│   │   │   └── wrapper/
│   │   │       └── gradle-wrapper.properties
│   │   ├── gradlew
│   │   ├── gradlew.bat
│   │   ├── settings.gradle
│   │   └── src/
│   │       └── main/
│   │           └── avro/
│   │               └── Cat.avsc
│   ├── avsc-from-subproject/
│   │   ├── README.md
│   │   ├── cat/
│   │   │   ├── build.gradle
│   │   │   └── src/
│   │   │       └── main/
│   │   │           └── avro/
│   │   │               └── Cat.avsc
│   │   ├── gradle/
│   │   │   └── wrapper/
│   │   │       └── gradle-wrapper.properties
│   │   ├── gradlew
│   │   ├── gradlew.bat
│   │   ├── schema/
│   │   │   ├── build.gradle
│   │   │   └── src/
│   │   │       └── main/
│   │   │           └── avro/
│   │   │               └── Breed.avsc
│   │   └── settings.gradle
│   └── default-custom-types/
│       ├── README.md
│       ├── build.gradle
│       ├── buildSrc/
│       │   ├── build.gradle
│       │   └── src/
│       │       └── main/
│       │           └── java/
│       │               └── custom/
│       │                   ├── AvroConventionPlugin.java
│       │                   ├── TimeZoneConversion.java
│       │                   ├── TimeZoneLogicalType.java
│       │                   └── TimeZoneLogicalTypeFactory.java
│       ├── gradle/
│       │   └── wrapper/
│       │       └── gradle-wrapper.properties
│       ├── gradlew
│       ├── gradlew.bat
│       ├── settings.gradle
│       └── src/
│           └── main/
│               ├── avro/
│               │   └── customConversion.avsc
│               └── java/
│                   └── custom/
│                       ├── TimeZoneConversion.java
│                       ├── TimeZoneLogicalType.java
│                       └── TimeZoneLogicalTypeFactory.java
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── scripts/
│   ├── run-avro-cli.sh
│   └── run-compile-schema.sh
├── settings.gradle
├── src/
│   ├── main/
│   │   └── java/
│   │       └── com/
│   │           └── github/
│   │               └── davidmc24/
│   │                   └── gradle/
│   │                       └── plugin/
│   │                           └── avro/
│   │                               ├── AvroBasePlugin.java
│   │                               ├── AvroExtension.java
│   │                               ├── AvroPlugin.java
│   │                               ├── AvroUtils.java
│   │                               ├── Constants.java
│   │                               ├── DefaultAvroExtension.java
│   │                               ├── Enums.java
│   │                               ├── FileExtensionSpec.java
│   │                               ├── FileState.java
│   │                               ├── FileUtils.java
│   │                               ├── FilenameUtils.java
│   │                               ├── GenerateAvroJavaTask.java
│   │                               ├── GenerateAvroProtocolTask.java
│   │                               ├── GenerateAvroSchemaTask.java
│   │                               ├── GradleCompatibility.java
│   │                               ├── GradleFeatures.java
│   │                               ├── GradleVersions.java
│   │                               ├── MapUtils.java
│   │                               ├── OutputDirTask.java
│   │                               ├── ProcessingState.java
│   │                               ├── ResolveAvroDependenciesTask.java
│   │                               ├── SchemaResolver.java
│   │                               ├── SetBuilder.java
│   │                               ├── Strings.java
│   │                               └── TypeState.java
│   └── test/
│       ├── groovy/
│       │   └── com/
│       │       └── github/
│       │           └── davidmc24/
│       │               └── gradle/
│       │                   └── plugin/
│       │                       └── avro/
│       │                           ├── AvroBasePluginFunctionalSpec.groovy
│       │                           ├── AvroPluginFunctionalSpec.groovy
│       │                           ├── AvroPluginSpec.groovy
│       │                           ├── AvroUtilsSpec.groovy
│       │                           ├── BuildCacheSupportFunctionalSpec.groovy
│       │                           ├── CustomConversionFunctionalSpec.groovy
│       │                           ├── DuplicateHandlingFunctionalSpec.groovy
│       │                           ├── EncodingFunctionalSpec.groovy
│       │                           ├── EnumHandlingFunctionalSpec.groovy
│       │                           ├── ExamplesFunctionalSpec.groovy
│       │                           ├── FunctionalSpec.groovy
│       │                           ├── GenerateAvroProtocolTaskFunctionalSpec.groovy
│       │                           ├── IntellijFunctionalSpec.groovy
│       │                           ├── KotlinDSLCompatibilityFunctionalSpec.groovy
│       │                           ├── OptionsFunctionalSpec.groovy
│       │                           ├── ResolveAvroDependenciesTaskFunctionalSpec.groovy
│       │                           ├── SchemaResolverSpec.groovy
│       │                           └── StringsSpec.groovy
│       ├── java/
│       │   └── com/
│       │       └── github/
│       │           └── davidmc24/
│       │               └── gradle/
│       │                   └── plugin/
│       │                       └── avro/
│       │                           └── test/
│       │                               └── custom/
│       │                                   ├── CommentGenerator.java
│       │                                   ├── TimeZoneConversion.java
│       │                                   ├── TimeZoneLogicalType.java
│       │                                   ├── TimeZoneLogicalTypeFactory.java
│       │                                   └── TimestampGenerator.java
│       └── resources/
│           ├── com/
│           │   └── github/
│           │       └── davidmc24/
│           │           └── gradle/
│           │               └── plugin/
│           │                   └── avro/
│           │                       ├── Message.avsc
│           │                       ├── customConversion.avpr
│           │                       ├── customConversion.avsc
│           │                       ├── dependent.avdl
│           │                       ├── duplicate/
│           │                       │   ├── Cat.avsc
│           │                       │   ├── ContainsFixed1.avsc
│           │                       │   ├── ContainsFixed2.avsc
│           │                       │   ├── ContainsFixed3.avsc
│           │                       │   ├── Dog.avsc
│           │                       │   ├── Fish.avsc
│           │                       │   ├── Person.avsc
│           │                       │   ├── Spider.avsc
│           │                       │   └── duplicateInSingleFile.avsc
│           │                       ├── enumField.avsc
│           │                       ├── enumMalformed.avsc
│           │                       ├── enumSimple.avsc
│           │                       ├── enumUnion.avsc
│           │                       ├── enumUseSimple.avsc
│           │                       ├── helloWorld.kt
│           │                       ├── idioma.avsc
│           │                       ├── interop-1.9.avdl
│           │                       ├── interop.avdl
│           │                       ├── mail.avpr
│           │                       ├── namespaced-idl/
│           │                       │   ├── v1/
│           │                       │   │   ├── test.avdl
│           │                       │   │   └── test_same_protocol.avdl
│           │                       │   └── v2/
│           │                       │       └── test.avdl
│           │                       ├── record-tools.vm
│           │                       ├── record.vm
│           │                       ├── shared.avdl
│           │                       └── user.avsc
│           ├── examples/
│           │   ├── inline/
│           │   │   └── Cat.avsc
│           │   └── separate/
│           │       ├── Breed.avsc
│           │       └── Cat.avsc
│           └── resolver/
│               ├── SimpleEnum.avsc
│               ├── SimpleFixed.avsc
│               ├── SimpleRecord.avsc
│               ├── UseArray.avsc
│               ├── UseArrayWithType.avsc
│               ├── UseEnum.avsc
│               ├── UseEnumWithType.avsc
│               ├── UseFixed.avsc
│               ├── UseFixedWithType.avsc
│               ├── UseMap.avsc
│               ├── UseMapWithType.avsc
│               ├── UseRecord.avsc
│               └── UseRecordWithType.avsc
├── test-project/
│   ├── build.gradle
│   ├── gradle/
│   │   └── wrapper/
│   │       └── gradle-wrapper.properties
│   ├── gradlew
│   ├── gradlew.bat
│   ├── settings.gradle
│   └── src/
│       ├── main/
│       │   ├── avro/
│       │   │   ├── BuggyRecord.avsc
│       │   │   ├── BuggyRecordWorkaround.avsc
│       │   │   ├── Messages.avsc
│       │   │   └── UUIDTestRecord.avsc
│       │   └── java/
│       │       └── project/
│       │           └── SystemUtil.java
│       └── test/
│           └── java/
│               └── project/
│                   ├── CLIComparisonTest.java
│                   ├── CLIUtil.java
│                   ├── RandomRecordTest.java
│                   └── RecordTest.java
└── test-project-kotlin/
    ├── build.gradle.kts
    ├── gradle/
    │   └── wrapper/
    │       └── gradle-wrapper.properties
    ├── gradlew
    ├── gradlew.bat
    ├── settings.gradle.kts
    └── src/
        ├── main/
        │   ├── avro/
        │   │   ├── BuggyRecord.avsc
        │   │   ├── BuggyRecordWorkaround.avsc
        │   │   ├── Messages.avsc
        │   │   └── UUIDTestRecord.avsc
        │   └── java/
        │       └── project/
        │           └── SystemUtil.java
        └── test/
            └── java/
                └── project/
                    ├── CLIComparisonTest.java
                    ├── CLIUtil.java
                    ├── RandomRecordTest.java
                    └── RecordTest.java

================================================
FILE CONTENTS
================================================

================================================
FILE: .editorconfig
================================================
# EditorConfig is awesome: http://EditorConfig.org

root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4

[*.yml]
indent_size = 2


================================================
FILE: .gitattributes
================================================
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat           text eol=crlf



================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: davidmc24


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Prerequisites**

* [ ] Are you running the latest version of the plugin? (Check [releases](https://github.com/davidmc24/gradle-avro-plugin/releases))
* [ ] Are you running a supported version of Gradle? (Check the [README](https://github.com/davidmc24/gradle-avro-plugin/blob/master/README.md))
* [ ] Are you running a supported version of Apache Avro? (Check the [README](https://github.com/davidmc24/gradle-avro-plugin/blob/master/README.md))
* [ ] Are you running a supported version of Java? (Check the [README](https://github.com/davidmc24/gradle-avro-plugin/blob/master/README.md))
* [ ] Did you check to see if an [issue](https://github.com/davidmc24/gradle-avro-plugin/issues) has already been submitted?
* [ ] Are you reporting to the correct repository?  If your schema doesn't work with the Apache Avro CLI tool either, it's not a problem with this plugin.  Running your file through the `CLIComparisonTest` in the sample project under the `test-project` directory can help diagnose this.
* [ ] Did you perform a cursory search?

For more information, see the [CONTRIBUTING](https://github.com/davidmc24/gradle-avro-plugin/blob/master/CONTRIBUTING.md) guide.

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior:

1. Project set up like this...
2. Source files like this...
3. Ran this task...
4. See error

Please provide complete input files that reproduce the problem, not fragments.
When possible, please express this using `test-project`.

**Expected behavior**

A clear and concise description of what you expected to happen.

**Environment (please complete the following information):**
 - Gradle Version [e.g. 5.6.1]
 - Apache Avro Version [e.g. 1.8.2]
 - Gradle-Avro Plugin Version [e.g. 0.17.0]
 - Java Version [e.g. 13.0.2]
 - OS: [e.g. Mac OS X Mojave, Windows 10, Ubuntu 16.04]

**Additional context**

Add any other context about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
  - name: Feature requests and ideas
    url: https://github.com/davidmc24/gradle-avro-plugin/discussions/categories/ideas
    about: Suggest an idea for this project
  - name: Questions
    url: https://github.com/davidmc24/gradle-avro-plugin/discussions/categories/q-a
    about: Please ask and answer questions here


================================================
FILE: .github/workflows/avro-compatibility.yml
================================================
name: Avro Compatibility Tests
on: [push, pull_request]
jobs:
  test:
    name: "Compatibility: avro ${{ matrix.avro }}/gradle ${{ matrix.gradle }}"
    runs-on: "ubuntu-latest"
    strategy:
      matrix:
        avro: ["1.11.0", "1.11.1", "1.11.2" , "1.11.3"]
        gradle: ["5.1", "7.6"]
        java: ["8"]
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: "zulu"
          java-version: ${{ matrix.java }}
      - uses: gradle/gradle-build-action@v2
        with:
          arguments: testCompatibility -PavroVersion=${{ matrix.avro }} -PgradleVersion=${{ matrix.gradle }}


================================================
FILE: .github/workflows/ci.yml
================================================
name: CI Build
on: [push, pull_request]
jobs:
  build:
    name: "Build"
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-java@v3
      with:
        distribution: "zulu"
        java-version: 8
    - uses: gradle/gradle-build-action@v2
      with:
        arguments: build
#    - uses: codecov/codecov-action@v1
#      with:
#        file: ./build/reports/jacoco/test/jacocoTestReport.xml
#        fail_ci_if_error: true


================================================
FILE: .github/workflows/gradle-compatibility.yml
================================================
name: Gradle Compatibility Tests
on: [push, pull_request]
jobs:
  test:
    name: "Compatibility: gradle ${{ matrix.gradle }}/java ${{ matrix.java }}"
    runs-on: "ubuntu-latest"
    strategy:
      matrix:
        avro: ["1.11.0"]
        gradle: [
          "5.1", "5.1.1", "5.2", "5.2.1", "5.3", "5.3.1", "5.4", "5.4.1", "5.5", "5.5.1", "5.6", "5.6.1", "5.6.2", "5.6.3", "5.6.4",
          "6.0", "6.0.1", "6.1", "6.1.1", "6.2", "6.2.1", "6.2.2", "6.3", "6.4", "6.4.1", "6.5", "6.5.1", "6.6", "6.6.1", "6.7", "6.7.1",
          "6.8", "6.8.1", "6.8.2", "6.8.3", "6.9", "6.9.1", "6.9.2", "6.9.3",
          "7.0", "7.0.1", "7.0.2", "7.1", "7.1.1", "7.2", "7.3", "7.3.1", "7.3.2", "7.3.3", "7.4", "7.4.1", "7.4.2", "7.5", "7.5.1", "7.6"
          # See here for latest versions: https://services.gradle.org/versions/
        ]
        java: ["8", "11"]
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: "zulu"
          java-version: ${{ matrix.java }}
      - uses: gradle/gradle-build-action@v2
        with:
          arguments: testCompatibility -PavroVersion=${{ matrix.avro }} -PgradleVersion=${{ matrix.gradle }}


================================================
FILE: .github/workflows/gradle-wrapper-validation.yml
================================================
# See https://github.com/marketplace/actions/gradle-wrapper-validation
name: "Validate Gradle Wrapper"
on: [push, pull_request]

jobs:
  validation:
    name: "Validation"
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: gradle/wrapper-validation-action@v1


================================================
FILE: .github/workflows/java-compatibility.yml
================================================
# See https://docs.gradle.org/current/userguide/compatibility.html
name: Java Compatibility Tests
on: [push, pull_request]
jobs:
  java8-12:
    name: "Compatibility: java ${{ matrix.java }}/gradle ${{ matrix.gradle }}"
    runs-on: "ubuntu-latest"
    strategy:
      matrix:
        avro: ["1.11.0"]
        gradle: ["5.1", "7.6"]
        java: ["8", "11"]
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: "zulu"
          java-version: ${{ matrix.java }}
      - uses: gradle/gradle-build-action@v2
        with:
          arguments: testCompatibility -PavroVersion=${{ matrix.avro }} -PgradleVersion=${{ matrix.gradle }}
  java17:
    name: "Compatibility: java ${{ matrix.java }}/gradle ${{ matrix.gradle }}"
    runs-on: "ubuntu-latest"
    strategy:
      matrix:
        avro: ["1.11.0"]
        gradle: ["7.3", "7.6"] # See here for latest versions: https://services.gradle.org/versions/
        java: ["17"]
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: "zulu"
          java-version: ${{ matrix.java }}
      - uses: gradle/gradle-build-action@v2
        with:
          arguments: testCompatibility -PavroVersion=${{ matrix.avro }} -PgradleVersion=${{ matrix.gradle }}
  java18:
    name: "Compatibility: java ${{ matrix.java }}/gradle ${{ matrix.gradle }}"
    runs-on: "ubuntu-latest"
    strategy:
      matrix:
        avro: ["1.11.0"]
        gradle: ["7.5", "7.6"] # See here for latest versions: https://services.gradle.org/versions/
        java: ["18"]
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: "zulu"
          java-version: ${{ matrix.java }}
      - uses: gradle/gradle-build-action@v2
        with:
          arguments: testCompatibility -PavroVersion=${{ matrix.avro }} -PgradleVersion=${{ matrix.gradle }}
  java-19:
    name: "Compatibility: java ${{ matrix.java }}/gradle ${{ matrix.gradle }}"
    runs-on: "ubuntu-latest"
    strategy:
      matrix:
        avro: ["1.11.0"]
        gradle: ["7.6"] # See here for latest versions: https://services.gradle.org/versions/
        java: ["19"]
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: "zulu"
          java-version: ${{ matrix.java }}
      - uses: gradle/gradle-build-action@v2
        continue-on-error: true
        with:
          arguments: testCompatibility -PavroVersion=${{ matrix.avro }} -PgradleVersion=${{ matrix.gradle }}
  java-ea:
    name: "Compatibility: java ${{ matrix.java }}/gradle ${{ matrix.gradle }}"
    runs-on: "ubuntu-latest"
    strategy:
      matrix:
        avro: ["1.11.0"]
        gradle: ["7.6"] # See here for latest versions: https://services.gradle.org/versions/
        java: ["20-ea"]
      fail-fast: false
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: "zulu"
          java-version: ${{ matrix.java }}
      - uses: gradle/gradle-build-action@v2
        continue-on-error: true
        with:
          arguments: testCompatibility -PavroVersion=${{ matrix.avro }} -PgradleVersion=${{ matrix.gradle }}


================================================
FILE: .github/workflows/os-compatibility.yml
================================================
name: OS Compatibility
on: [push, pull_request]
jobs:
  build:
    name: "Compatibility: ${{ matrix.os }}"
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        java: [8] # Minimum supported major version
        os: [ubuntu-latest, windows-latest, macOS-latest] # All supported OS
    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-java@v3
      with:
        distribution: "zulu"
        java-version: ${{ matrix.java }}
    - uses: gradle/gradle-build-action@v2
      with:
        arguments: test


================================================
FILE: .github/workflows/publish.yml
================================================
name: Publish package to the Maven Central Repository
on:
  release:
    types: [created]
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v3
        with:
          distribution: "zulu"
          java-version: 8
      - uses: gradle/gradle-build-action@v2
        with:
          arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository -PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }}
        env:
          SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
          SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
          SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}


================================================
FILE: .gitignore
================================================
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db

# Editor Files #
################
*~
*.swp

# Gradle Files #
################
.gradle
local.properties

# Build output directies
/target
**/test-output
**/target
**/bin
build
*/build
.m2

# IntelliJ specific files/directories
out
.idea
*.ipr
*.iws
*.iml
atlassian-ide-plugin.xml

# Eclipse specific files/directories
.classpath
.project
.settings
.metadata
.factorypath
.generated

# NetBeans specific files/directories
.nbattrs

# Specifically include the gradle wrapper jar
!/gradle/wrapper/gradle-wrapper.jar

# Scripts for use on the local machine
/local-*.sh
/scripts/downloads/
/scripts/input/
/scripts/output/


================================================
FILE: CHANGES.md
================================================
# Change Log

## Unreleased

## 1.9.1
* Upgrade commons-compress to 1.24.0 due to CVE-2023-42503

## 1.9.0
* Built using Avro 1.11.3

## 1.8.0
* Built using Avro 1.11.2

## 1.7.1
* Fix vulnerabilities in transitive dependencies (contribution from [BlacCello](https://github.com/BlacCello)); see https://github.com/davidmc24/gradle-avro-plugin/pull/229

## 1.7.0
* Support for using conversions and type factories located outside of build classpath (contribution from [erdi](https://github.com/erdi)); see https://github.com/davidmc24/gradle-avro-plugin/pull/228

## 1.6.0
* Add support for configuring classpath for `GenerateAvroJavaTask` (thanks to [crtlib](https://github.com/crtlib)); see https://github.com/davidmc24/gradle-avro-plugin/pull/222
* Drop compatibility testing for old versions of Java (9, 10, 12, 13, 14, 15, 16)
* Built using Gradle 7.6
* Updated compatibility testing through Gradle 7.6
* Updated compatibility testing through Java 19

## 1.5.0
* Added support for `additionalVelocityTool` thanks to a contribution from [dcracauer](https://github.com/dcracauer); see https://github.com/davidmc24/gradle-avro-plugin/pull/211
* Built using Avro 1.11.1
* Built using Gradle 7.5.1
* Updated compatibility testing through Gradle 7.5.1
* Updated compatibility testing through Java 18

## 1.4.0
* Drop support for Kotlin plugin integration

## 1.3.0
* Built using Avro 1.11.0
* Dropped support for Avro 1.9.0-1.10.2 due to use of new SpecificRecordBuilderBase constructor in Avro 1.11.0
* Default field visibility is now "PRIVATE" to match Avro's new default, as "PUBLIC_DEPRECATED" is no longer supported in Avro 1.11.0
* Built using Gradle 7.3
* Updated compatibility testing through Gradle 7.3
* Updated compatibility testing through Kotlin 1.5.31
* Added compatibility with Java 17
* `GenerateAvroProtocolTask` now has a debug log to output its classpath
* `GenerateAvroProtocolTask` will no longer delegate to the system classloader

## 1.2.1
* Built using Gradle 7.1.1
* Updated compatibility testing through Gradle 7.1.1
* When `sourcesJar` is used, declares dependency on `GenerateAvroJavaTask`s to avoid disabling execution optimizations introduced in Gradle 7.1. (see #167)

## 1.2.0
* Avro 1.9.0-1.9.2 is supported again (no changed needed; just change in support policy and testing)
* `generateAvroProtocol` task fails if avpr file will get overwritten (due to multiple IDL files using the same namespace and protocol)

## 1.1.0
* Built using Avro 1.10.2
* Built using Gradle 7.0-rc-1
* Updated compatibility testing through Gradle 6.8.3/7.0-rc-1
* Updated compatibility testing through Kotlin 1.4.32
* Updated compatibility testing to include Java 16/17-ea
* Adopted Github Actions for compatibility testing

## 1.0.0
* Published to Maven Central (no longer published to JCenter)
* New plugin IDs: `com.github.davidmc24.gradle.plugin.avro` and `com.github.davidmc24.gradle.plugin.avro-base`
* New package for tasks: `com.github.davidmc24.gradle.plugin.avro`

# Pre-1.0 Versions

These versions used a different publishing process.  They use different coordinates/packages and may no longer be available in a traditional Maven repository.  It is strongly recommended to upgrade to a newer version.

If you still need to use them, the artifacts can be downloaded from [GitHub Releases](https://github.com/davidmc24/gradle-avro-plugin/releases) or accessed via [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin).
The plugin IDs are `com.commercehub.gradle.plugin.avro` and `com.commercehub.gradle.plugin.avro-base`, with all tasks in the package `com.commercehub.gradle.plugin.avro`.

## 0.22.0
* Add [Configuration Cache](https://docs.gradle.org/6.6/userguide/configuration_cache.html) support (#129; thanks to [dcabasson](https://github.com/dcabasson) and [eskatos](https://github.com/eskatos))
* Add coverage reporting via JaCoco/Codecov to the plugin's build pipeline
* Add support for multiple IDL files with the same name in different directories (#123)
  * The `.avpr` file generated by `GenerateAvroProtocolTask` is now based on the namespace and name of the protocol, rather than the name of the `.avdl` file.
* Built using Avro 1.10.1
* Built using Gradle 6.7.1
* Updated compatibility testing to include Java 15
* Updated compatibility testing through Gradle 6.7.1
* Updated compatibility testing through Kotlin 1.4.20

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.22.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.22.0)

## 0.21.0
* Built using Avro 1.10.0
* Drop support for Avro 1.9.X
* Removed support for `dateTimeLogicalType`; The behavior is now as if it were always `JSR-310` due to an upstream change
* Add support for `optionalGettersForNullableFieldsOnly`
* Apply @Classpath annotation to classpath on `GenerateAvroProtocolTask`

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.21.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.21.0)

## 0.20.0
* Built using Gradle 6.5
* Updated compatibility testing to include Java 14
* Updated compatibility testing through Gradle 6.5
* Add `ResolveAvroDependenciesTask` (#115)

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.20.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.20.0)

## 0.19.1
* Fix schema dependency resolution when types are referenced with a `{ "type": NAME }` block rather than just `NAME` (#107)
* Eliminate `NullPointerException` handling in schema dependency resolution, as it no longer appears to be needed.

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.19.1)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.19.1)

## 0.19.0
* Add support for Gradle 6.0-6.2.2 (#101)
* Drop support for Gradle versions prior to 5.1
* Update version of kotlin plugin in tests/example
* Built using Avro 1.9.2 (#104)
* Add support for Java 13
* Add support for testing multiple Kotlin versions
* Update plugin's own build to address some deprecation warnings of APIs being removed in Gradle 7
* Add tests for Kotlin DSL usage (#61)
* Support [Task Configuration Avoidance](https://docs.gradle.org/current/userguide/task_configuration_avoidance.html) (#97); thanks to [dcabasson](https://github.com/dcabasson) for the collaboration
* Upgrade Codenarc from 1.4 to 1.5
* Preliminary Java 14 support

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.19.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.19.0)

## 0.18.0
* Use reproducible file order for plugin archives
* Eliminate usage of internal conventions API, using new Lazy Configuration approach instead; requires Gradle 4.4+
  * Technically, the APIs needed are available in Gradle 4.3, but there is a bug related to un-set `Property` instances in 4.3 and 4.3.1; see https://github.com/gradle/gradle/issues/3879
* Cleaned up compatibility code for older versions of Gradle
* Built using Gradle 5.6.2
* Upgrade Spock from 1.2 to 1.3
* Upgrade Checkstyle from 6.1.1 to 8.23 and adjust rules used
* Upgrade Codenarc from 1.0 to 1.4 and adjust rules used
* Change source compatibility to 8
* Modernized for Java 8
* Built using Avro 1.9.1
* GenerateAvroProtocolTask now has a `classpath` property; defaults to the runtime configuration when the Avro plugin is applied
* GenerateAvroProtocolTask now properly declares the `classpath` as an input; fixes #86; thanks to [RichSteele](https://github.com/RichSteele) for the bug report
* Fix handling of default `outputCharacterEncoding` (use of system default character set to match Java compiler)
* Add support for generating getters that return Optional (#90); contribution from [bspeakmon](https://github.com/bspeakmon)
* Add support for `logicalTypeFactories` and `customConversions`; fixes #92

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.18.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.18.0)

## 0.17.0
* Built using Avro 1.9.0
* Removed configuration setting `validateDefaults`; defaults are now always validated due to an upstream change
* Java 7 is no longer supported, as Avro 1.9.0 is now Java 8+
* Began testing using Java 12

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.17.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.17.0)

## 0.16.0
* Built using Gradle 4.10.2
* Updated compatibility testing through Gradle 4.10.2
* Added support for the Gradle [Build Cache](https://docs.gradle.org/current/userguide/build_cache.html) (#48); contribution from [dcabasson](https://github.com/dcabasson)
* Upgrade Spock from 1.0 to 1.2
* Update plugin publishing mode to address Gradle 5.0 deprecation warning

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.16.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.16.0)

## 0.15.1
* Fix "Boolean configuration cannot be set with boolean values from Kotlin DSL" (#60)

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.15.1)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.15.1)

## 0.15.0
* Built using Gradle 4.9
* Updated compatibility testing through Gradle 4.9
* Began testing using Java 11
* Add support for generating schema files (#56)
* Fix bug where `GenerateAvroProtocolTask` can't be used without a runtime configuration

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.15.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.15.0)

## 0.14.2
* Stop creating default generated output directories when `outputDir` is customized and IntelliJ integration is used (#52)

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.14.2)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.14.2)

## 0.14.1
* Built using Gradle 4.6
* Updated compatibility testing through Gradle 4.6
* Began testing using Java 10
* Began testing using Kotlin 1.2.31
* Fixed infinite loop when a schema file contains multiple definitions of the same type (#47)

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.14.1)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.14.1)

## 0.14.0
* Built using Gradle 4.5
* Updated compatibility testing through Gradle 4.5
* Support for validation of default values in schema (#42)

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.14.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.14.0)

## 0.13.0
* Remove pre-cleaning behavior from `GenerateAvroJavaTask` (#41)

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.13.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.13.0)

## 0.12.0
* Improve support for Kotlin (#36)

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.12.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.12.0)

## 0.11.0
* Built using Gradle 4.2.1
* Began testing using Java 9
* Built using Avro 1.8.2
* Breaking backward compatibility with Avro versions older than 1.8.2
* Add new configuration option "enableDecimalLogicalType" to generate `BigDecimal` for fields annotated with `logicalType` equals to `decimal`
* Breaking backward compatibility caused by "enableDecimalLogicalType" default value set `true`. `BigDecimal` will be used instead of old usage of `ByteBuffer`

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.11.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.11.0)

## 0.10.0
* Drop support for Gradle 2.x
* As Gradle 3.0+ has a minimum Java version requiremenet of Java 7, drop support for Java 6
* Update source compatibility to Java 7
* Reduce access to utility methods not intended for re-use
* Stopped publishing to [Gradle plugin portal](https://plugins.gradle.org)
* Published to [Bintray](https://bintray.com/commercehub-oss/main/gradle-avro-plugin)
* MapUtils class is no longer public

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.10.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.10.0)

## 0.9.1
* Built using Gradle 4.1
* Updated versions for cross-compatibility testing

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.9.1)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.9.1)

## 0.9.0
* Built using Avro 1.8.1 (#23)
* Built using Gradle 2.13
* Added version cross-compatibility testing

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.9.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.9.0)

## 0.8.1
* Compatible at runtime with Gradle 5; no functional changes.  Compiled with Gradle 5.6.

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.8.1)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.8.1)

## 0.8.0
* Add support for Java 6 (#21)

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.8.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.8.0)

## 0.7.0
* Remove usage of Apache Commons IO (#19)
* Add ability to retry processing of duplicate type definitions (#13)
* Renamed "encoding" option to "outputCharacterEncoding" to match Avro compiler
* Allowed setting "outputCharacterEncoding" to a `java.nio.charset.Charset` (in addition to a `String` charset name)
* Allowed setting "stringType" to a `org.apache.avro.generic.GenericData.StringType` (in addition to a String)
* Allowed setting "fieldVisibility" to a `org.apache.avro.compiler.specific.SpecificCompiler.FieldVisibility` (in addition to a String)
* Fixed handling of non-"true" String settings for "createSetters" option
* Automatically use encoding from `JavaCompile` task as "outputCharacterEncoding", if set
* Change default "outputCharacterEncoding" to system default to match `JavaCompile` task behavior (#20)

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.7.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.7.0)

## 0.6.1
* Add Checkstyle ImportControl to prevent accidentally adding dependencies on libraries that Gradle makes available for build but not runtime.
* Remove usage of Guava (#18)

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.6.1)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.6.1)

## 0.6.0
* Add new configuration option "templateDirectory" to set source directory for the Avro compiler's Velocity templates.
* Add new configuration option "createSetters" to allow suppressing the Avro compiler's creation of setters in created domain objects.
* Matching of fieldVisibility settings is now case-insensitive.
* Removed some excessive debug logging
* Built against Gradle 2.7
* Added Checkstyle and Codenarc to build
* Known Bug: doesn't work properly unless you manually add a dependency on guava; please upgrade to 0.6.1

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.6.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.6.0)

## 0.5.0
* Add support for schemas/protocols/IDL in subdirectories of `src/main/avro`, etc. (#11)
* Expose original error messages from `avro-compiler` when compilation fails

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.5.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.5.0)

## 0.4.0
* Add ability to specify fieldVisibility for generated Java source; contribution from [wooder79](https://github.com/wooder79)
* Removed support for unqualified plugin ID (just "avro")
* Published via new mechanism to [Gradle plugin portal](https://plugins.gradle.org)
* Stopped publishing to previous location on Bintray
* Built against Gradle 2.6; uses [test kit](https://docs.gradle.org/current/userguide/test_kit.html) for functional testing

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.4.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.4.0)

## 0.3.4
* Fix registration of generated sources for compilation (#8)
* Change classloader handling to better support import of external dependencies (#9)

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.3.4)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.3.4)

## 0.3.3
* Fix generation of Java files from .avdl files; contribution from [viacoban](https://github.com/viacoban)

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.3.3)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.3.3)

## 0.3.2
* Improve handling when custom buildDir is used

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.3.2)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.3.2)

## 0.3.1
* Fix extension support for configuring encoding
* Make default encoding UTF-8

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.3.1)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.3.1)

## 0.3.0
* IntelliJ: register generated source directories even if they don't already exist.
* Add avro-base plugin, which exposes tasks and the extension without creating tasks, defaults, etc.
* Add support for configuring encoding

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.3.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.3.0)

## 0.2.0
* Build against Gradle 1.12
* Compile using Avro 1.7.6
* Support for qualified plugin ID
* Deprecate unqualified plugin ID

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.2.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.2.0)

## 0.1.3
* Always regenerate all Java classes when any schema file changes to avoid some classes having outdated schema information.

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.1.3)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.1.3)

## 0.1.2
* Eliminate dependency on guava, make dependency on commons-io explicit

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.1.2)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.1.2)

## 0.1.1
* Fixed NullPointerException when performing clean builds

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.1.1)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.1.1)

## 0.1.0
* Add support for converting IDL files to JSON protocol declaration files
* Add support for generating Java classes from JSON protocol declaration files
* Add support for generating Java classes from JSON schema declaration files
* Add support for inter-dependent JSON schema declaration files
* Add support for tweaking source/exclude directories in IntelliJ
* Add support for specifying the string type to use in generated classes

Links:
* [Release](https://github.com/davidmc24/gradle-avro-plugin/releases/tag/0.1.0)
* [JitPack](https://jitpack.io/#davidmc24/gradle-avro-plugin/0.1.0)


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
  address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at david@carrclan.us.
We will endeavor to review submitted complaints and respond in a manner that
CommerceHub (in its sole discretion) deems necessary and appropriate to the
circumstances. In enforcing this Code of Conduct, Project maintainers may
(but shall not be obligated to) remove, edit, or reject comments, commits,
code, wiki edits, issues, and other contributions that are not aligned to
this Code of Conduct, or to ban temporarily or permanently any contributor
for other behaviors that they deem inappropriate, threatening, offensive,
or harmful.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing

> Before contributing, please read our [code of conduct](https://github.com/davidmc24/gradle-avro-plugin/blob/master/CODE_OF_CONDUCT.md).

Before starting work on an enhancement, it's highly recommended to open an [issue](https://github.com/davidmc24/gradle-avro-plugin/issues) to describe the intended change.
This allows for the project maintainers to provide feedback before you've done work that may not fit the project's vision.

Note that this plugin is primarily focussed on exposing functionality from the [Apache Avro Java API](https://avro.apache.org/docs/current/api/java/index.html) in the ways most commonly used in Gradle builds.
If the capability that you are looking for doesn't currently exist in said upstream API, you're likely better off requesting the feature from the [Apache Avro project](https://avro.apache.org/) than requesting it here.

Some possible enhancements may have already been considered and documented.  Check the design-docs folder for the design specification for such features.

To run the project's build, run:

* (Mac/Linux): `./gradlew build`
* (Windows): `gradlew.bat build`

This will run static analysis against the project, run the project's tests, and build the project.
If any failures are detected, please correct them prior to submitting your pull request.

All enhancements should be accompanied by test coverage.
Our tests are based on [Spock](https://github.com/spockframework/spock).
Generally, it's best to extend our `FunctionalSpec` class, which provides useful functions for running the plugin within Gradle.

Note that the "build" task only tests the plugin against a single version of Gradle/Avro.
If you want to test compatibility with a larger range, consider using the `testRecentVersionCompatibility` task or `testVersionCompatibility` task.

For information on how to use GitHub to submit a pull request, see [Collaborating on projects using issues and pull requests](https://help.github.com/categories/collaborating-on-projects-using-issues-and-pull-requests/).


================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.

"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.

"Object" form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.

2. Grant of Copyright License.

Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.

3. Grant of Patent License.

Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.

4. Redistribution.

You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:

You must give any other recipients of the Work or Derivative Works a copy of
this License; and
You must cause any modified files to carry prominent notices stating that You
changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.

5. Submission of Contributions.

Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.

6. Trademarks.

This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.

7. Disclaimer of Warranty.

Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.

8. Limitation of Liability.

In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability.

While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work

To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "[]" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


================================================
FILE: README.md
================================================
# End of life

This project is no longer maintained.
Its code has been donated to the [Apache Avro project](http://avro.apache.org/), which will be handling releases going forward.

# 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.

[![Build Status](https://github.com/davidmc24/gradle-avro-plugin/workflows/CI%20Build/badge.svg)](https://github.com/davidmc24/gradle-avro-plugin/actions)

# Compatibility

**NOTE**: Pre-1.0 versions used a different publishing process/namespace.  It is strongly recommended to upgrade to a newer version.  Further details can be found in the [change log](CHANGES.md).

* Currently tested against Java 8, 11, and 17-19
    * Though not supported yet, tests are also run against Java 20 to provide early notification of potential incompatibilities.
    * Java 19 support requires Gradle 7.6 or higher (as per Gradle's release notes)
    * Java 18 support requires Gradle 7.5 or higher (as per Gradle's release notes)
    * Java 17 support requires Gradle 7.3 or higher (as per Gradle's release notes)
    * Java 16 support requires Gradle 7.0 or higher (as per Gradle's release notes)
    * Java 15 support requires Gradle 6.7 or higher (as per Gradle's release notes)
    * Java 14 support requires Gradle 6.3 or higher (as per Gradle's release notes)
    * Java 13 support requires Gradle 6.0 or higher
    * Java 8-12 support requires Gradle 5.1 or higher (versions lower than 5.1 are no longer supported)
* Currently built against Gradle 7.6
    * Currently tested against Gradle 5.1-5.6.4 and 6.0-7.6
* Currently built against Avro 1.11.3
    * Currently tested against Avro 1.11.0-1.11.3
    * Avro 1.9.0-1.10.2 were last supported in version 1.2.1 
* Support for Kotlin
    * Dropped integration with the Kotlin plugin in plugin version 1.4.0, as Kotlin 1.7.x would require compile-time dependency on a specific Kotlin version
      * Wiring between the tasks added by the plugin and the Kotlin compilation tasks can either be added by your build logic, or a derived plugin
    * Plugin version 1.3.0 was the last version with tested support for Kotlin 
      * It is believed to work with Kotlin 1.6.x as well
      * It was tested against Kotlin plugin versions 1.3.20-1.3.72 and 1.4.0-1.4.32 and 1.5.0-1.5.31 using the latest compatible version of Gradle
      * It was tested against Kotlin plugin versions 1.2.20-1.2.71 and 1.3.0-1.3.11 using Gradle 5.1
    * Kotlin plugin versions 1.4.20-1.4.32 require special settings to work with Java 17+; see [KT-43704](https://youtrack.jetbrains.com/issue/KT-43704#focus=Comments-27-4639603.0-0)
    * Kotlin plugin version 1.3.30 is not compatible with Gradle 7.0+
    * Kotlin plugin versions starting with 1.4.0 require Gradle 5.3+
    * Kotlin plugin versions prior to 1.3.20 do not support Gradle 6.0+
    * Kotlin plugin versions prior to 1.2.30 do not support Java 10+
    * Version of the Kotlin plugin prior to 1.2.20 are unlikely to work
* Support for Gradle Kotlin DSL

# Usage

Add the following to your build files.  Substitute the desired version based on [CHANGES.md](https://github.com/davidmc24/gradle-avro-plugin/blob/master/CHANGES.md).

`settings.gradle`:
```groovy
pluginManagement {
    repositories {
        gradlePluginPortal()
        mavenCentral()
    }
}
```

`build.gradle`:
```groovy
plugins {
    id "com.github.davidmc24.gradle.plugin.avro" version "VERSION"
}
```

Additionally, ensure that you have an implementation dependency on Avro, such as:

```groovy
repositories {
    mavenCentral()
}
dependencies {
    implementation "org.apache.avro:avro:1.11.0"
}
```

If you now run `gradle build`, Java classes will be compiled from Avro files in `src/main/avro`.
Actually, it will attempt to process an "avro" directory in every `SourceSet` (main, test, etc.)

# Configuration

There are a number of configuration options supported in the `avro` block.

| option                               | default                            | description                                                                                                       |
|--------------------------------------|------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| createSetters                        | `true`                             | `createSetters` passed to Avro compiler                                                                           |
| createOptionalGetters                | `false`                            | `createOptionalGetters` passed to Avro compiler                                                                   |
| gettersReturnOptional                | `false`                            | `gettersReturnOptional` passed to Avro compiler                                                                   |
| optionalGettersForNullableFieldsOnly | `false`                            | `optionalGettersForNullableFieldsOnly` passed to Avro compiler                                                    |
| fieldVisibility                      | `"PRIVATE"`                        | `fieldVisibility` passed to Avro compiler                                                                         |
| outputCharacterEncoding              | see below                          | `outputCharacterEncoding` passed to Avro compiler                                                                 |
| stringType                           | `"String"`                         | `stringType` passed to Avro compiler                                                                              |
| templateDirectory                    | see below                          | `templateDir` passed to Avro compiler                                                                             |
| additionalVelocityToolClasses        | see below                          | `additionalVelocityTools` passed to Avro compiler                                                                 |
| enableDecimalLogicalType             | `true`                             | `enableDecimalLogicalType` passed to Avro compiler                                                                |
| conversionsAndTypeFactoriesClasspath | empty `ConfigurableFileCollection` | used for loading custom conversions and logical type factories                                                    |
| logicalTypeFactoryClassNames         | empty `Map`                        | map from names to class names of logical types factories to be loaded from `conversionsAndTypeFactoriesClasspath` |
| customConversionClassNames           | empty `List`                       | class names of custom conversions to be loaded from `conversionsAndTypeFactoriesClasspath`                        |

Additionally, the `avro` extension exposes the following methods:

* `logicalTypeFactory(String typeName, Class typeFactoryClass)`: register an additional logical type factory
* `customConversion(Class conversionClass)`: register a custom conversion

## createSetters

Valid values: `true` (default), `false`; supports equivalent `String` values

Set to `false` to not create setter methods in the generated classes.

Example:

```groovy
avro {
    createSetters = false
}
```

## createOptionalGetters

Valid values: `false` (default), `true`; supports equivalent `String` values

Set to `true` to create additional getter methods that return their fields wrapped in an
[Optional](https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html). For a field with
name `abc` and type `string`, this setting will create a method
`Optional<java.lang.String> getOptionalAbc()`.

Example:

```groovy
avro {
    createOptionalGetters = false
}
```

## gettersReturnOptional

Valid values: `false` (default), `true`; supports equivalent `String` values

Set to `true` to cause getter methods to return
[Optional](https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html) wrappers of the
underlying type. Where [`createOptionalGetters`](#createoptionalgetters) generates an additional
method, this one replaces the existing getter.

Example:

```groovy
avro {
    gettersReturnOptional = false
}
```

## optionalGettersForNullableFieldsOnly

Valid values: `false` (default), `true`; supports equivalent `String` values

Set to `true` in conjuction with `gettersReturnOptional` to `true` to return
[Optional](https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html) wrappers of the
underlying type. Where [`gettersReturnOptional`](#gettersReturnOptional) alone changes all getters to
return `Optional`, this one only returns Optional for nullable (null union) field definitions.
Setting this to `true` without setting `gettersReturnOptional` to `true` will result in this flag having no effect.

Example:
```groovy
avro {
    gettersReturnOptional = true
    optionalGettersForNullableFieldsOnly = true
}
```

## fieldVisibility

Valid values: any [FieldVisibility](https://avro.apache.org/docs/1.11.0/api/java/org/apache/avro/compiler/specific/SpecificCompiler.FieldVisibility.html) or equivalent `String` name (matched case-insensitively); default `"PRIVATE"` (default)

By default, the fields in generated Java files will have private visibility.
Set to `"PRIVATE"` to explicitly specify private visibility of the fields, or `"PUBLIC"` to specify public visibility of the fields.

Example:

```groovy
avro {
    fieldVisibility = "PUBLIC"
}
```

## outputCharacterEncoding

Valid values: any [Charset](http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html) or equivalent `String` name

Controls the character encoding of generated Java files.
If using the plugin's conventions (i.e., not just the base plugin), the associated `JavaCompile` task's encoding will be used automatically.
Otherwise, it will use the value configured in the `avro` block, defaulting to `"UTF-8"`.

Examples:

```groovy
// Option 1: configure compilation task (avro plugin will automatically match)
tasks.withType(JavaCompile).configureEach {
    options.encoding = 'UTF-8'
}
// Option 2: just configure avro plugin
avro {
    outputCharacterEncoding = "UTF-8"
}
```

## stringType

Valid values: any [StringType](http://avro.apache.org/docs/1.8.1/api/java/org/apache/avro/generic/GenericData.StringType.html) or equivalent `String` name (matched case-insensitively); default `"String"` (default)

By default, the generated Java files will use [`java.lang.String`](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html) to represent string types.
Alternatively, you can set it to `"Utf8"` to use [`org.apache.avro.util.Utf8`](https://avro.apache.org/docs/1.8.1/api/java/org/apache/avro/util/Utf8.html) or `"charSequence"` to use [`java.lang.CharSequence`](http://docs.oracle.com/javase/7/docs/api/java/lang/CharSequence.html).

```groovy
avro {
    stringType = "CharSequence"
}
```

## templateDirectory

By default, files will be generated using Avro's default templates.
If desired, you can override the template set used by either setting this property or the `"org.apache.avro.specific.templates"` System property.

```groovy
avro {
    templateDirectory = "/path/to/velocity/templates"
}
```

## additionalVelocityToolClasses

When overriding the default set of Velocity templates provided with Avro, it is often desirable to provide additional tools to use during generation. 
The class names you provide will be made available for use in your Velocity templates. An instance of each class provided will be created using 
the default constructor (required). When registered, they will be available as $class.simpleName(). Given the example configuration below,
two tools would be registered, and be available as escape and json.
 

```groovy
avro {
  additionalVelocityToolClasses = ['com.yourpackage.Escape', 'com.yourpackage.JSON']
}
```

## enableDecimalLogicalType

Valid values: `true` (default), `false`; supports equivalent `String` values

By default, generated Java files will use [`java.math.BigDecimal`](https://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html)
for representing `fixed` or `bytes` fields annotated with `"logicalType": "decimal"`.
Set to `false` to use [`java.nio.ByteBuffer`](https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html) in generated classes.

Example:

```groovy
avro {
    enableDecimalLogicalType = false
}
```

## conversionsAndTypeFactoriesClasspath, logicalTypeFactoryClassNames and customConversionClassNames

Properties that can be used for loading [Conversion](https://avro.apache.org/docs/current/api/java/org/apache/avro/Conversion.html) and [LogicalTypeFactory](https://avro.apache.org/docs/current/api/java/org/apache/avro/LogicalTypes.LogicalTypeFactory.html) classes from outside of the build classpath.

Example:

```groovy
configurations {
    customConversions
}

dependencies {
    customConversions(project(":custom-conversions"))
}

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")
}
```

# IntelliJ Integration

The plugin attempts to make IntelliJ play more smoothly with generated sources when using Gradle-generated project files.
However, there are still some rough edges.  It will work best if you first run `gradle build`, and _after_ that run `gradle idea`.
If you do it in the other order, IntelliJ may not properly exclude some directories within your `build` directory.

# Alternate Usage

If the defaults used by the plugin don't work for you, you can still use the tasks by themselves.
In this case, use the `com.github.davidmc24.gradle.plugin.avro-base` plugin instead, and create tasks of type `GenerateAvroJavaTask` and/or `GenerateAvroProtocolTask`.

Here's a short example of what this might look like:

```groovy
import com.github.davidmc24.gradle.plugin.avro.GenerateAvroJavaTask

apply plugin: "java"
apply plugin: "com.github.davidmc24.gradle.plugin.avro-base"

dependencies {
    implementation "org.apache.avro:avro:1.11.0"
}

def generateAvro = tasks.register("generateAvro", GenerateAvroJavaTask) {
    source("src/avro")
    outputDir = file("dest/avro")
}

tasks.named("compileJava").configure {
    source(generateAvro)
}
```

# File Processing

When using this plugin, it is recommended to define each record/enum/fixed type in its own file rather than using inline type definitions.
This approach allows defining any type of schema structure, and eliminates the potential for conflicting definitions of a type between multiple files.
The plugin will automatically recognize the dependency and compile the files in the correct order.
For example, instead of `Cat.avsc`:

```json
{
    "name": "Cat",
    "namespace": "example",
    "type": "record",
    "fields" : [
        {
            "name": "breed",
            "type": {
                "name": "Breed",
                "type": "enum",
                "symbols" : [
                    "ABYSSINIAN", "AMERICAN_SHORTHAIR", "BIRMAN", "MAINE_COON", "ORIENTAL", "PERSIAN", "RAGDOLL", "SIAMESE", "SPHYNX"
                ]
            }
        }
    ]
}
```

use `Breed.avsc`:

```json
{
    "name": "Breed",
    "namespace": "example",
    "type": "enum",
    "symbols" : ["ABYSSINIAN", "AMERICAN_SHORTHAIR", "BIRMAN", "MAINE_COON", "ORIENTAL", "PERSIAN", "RAGDOLL", "SIAMESE", "SPHYNX"]
}
```


and `Cat.avsc`:

```json
{
    "name": "Cat",
    "namespace": "example",
    "type": "record",
    "fields" : [
        {"name": "breed", "type": "Breed"}
    ]
}
```

There may be cases where the schema files contain inline type definitions and it is undesirable to modify them.
In this case, the plugin will automatically recognize any duplicate type definitions and check if they match.
If any conflicts are identified, it will cause a build failure.

# Kotlin Support

The Java classes generated from your Avro files should be automatically accessible in the classpath to Kotlin classes in the same sourceset, and transitively to any sourcesets that depend on that sourceset.
This is accomplished by this plugin detecting that the Kotlin plugin has been applied, and informing the Kotlin compilation tasks of the presence of the generated sources directories for cross-compilation.

This support does *not* support producing the Avro generated classes as Kotlin classes, as that functionality is not currently provided by the upstream Avro library.

# Kotlin DSL Support

Special notes relevant to using this plugin via the Gradle Kotlin DSL:

* Apply the plugin declaratively using the `plugins {}` block.  Otherwise, various features may not work as intended.  See [Configuring Plugins in the Gradle Kotlin DSL](https://github.com/gradle/kotlin-dsl/blob/master/doc/getting-started/Configuring-Plugins.md) for more details.
* Configuration in the `avro {}` block must be applied differently than in the Groovy DSL.  See the example below for details.

### Example Kotlin DSL Setup:

In `gradle.build.kts` add:

```kotlin
plugins {
    // Find latest release here: https://github.com/davidmc24/gradle-avro-plugin/releases
    id("com.github.davidmc24.gradle.plugin.avro") version "VERSION"
}
```

And then in your `settings.gradle.kts` add:

```kotlin
pluginManagement {
    repositories {
        gradlePluginPortal()
        mavenCentral()
    }
}
```

The syntax for configuring the extension looks like this:

```kotlin
avro {
    isCreateSetters.set(true)
    isCreateOptionalGetters.set(false)
    isGettersReturnOptional.set(false)
    isOptionalGettersForNullableFieldsOnly.set(false)
    fieldVisibility.set("PUBLIC_DEPRECATED")
    outputCharacterEncoding.set("UTF-8")
    stringType.set("String")
    templateDirectory.set(null as String?)
    isEnableDecimalLogicalType.set(true)
}
```

# Resolving schema dependencies

If desired, you can generate JSON schema with dependencies resolved.

Example build:

```groovy
import com.github.davidmc24.gradle.plugin.avro.ResolveAvroDependenciesTask

apply plugin: "com.github.davidmc24.gradle.plugin.avro-base"

tasks.register("resolveAvroDependencies", ResolveAvroDependenciesTask) {
    source file("src/avro/normalized")
    outputDir = file("build/avro/resolved")
}
```

# Generating schema files from protocol/IDL

If desired, you can generate JSON schema files.
To do this, apply the plugin (either `avro` or `avro-base`), and define custom tasks as needed for the schema generation.
From JSON protocol files, all that's needed is the `GenerateAvroSchemaTask`.
From IDL files, first use `GenerateAvroProtocolTask` to convert the IDL files to JSON protocol files, then use `GenerateAvroSchemaTask`.

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

apply plugin: "com.github.davidmc24.gradle.plugin.avro-base"

def generateProtocol = tasks.register("generateProtocol", GenerateAvroProtocolTask) {
    source file("src/main/avro")
    include("**/*.avdl")
    outputDir = file("build/generated-avro-main-avpr")
}

tasks.register("generateSchema", GenerateAvroSchemaTask) {
    dependsOn generateProtocol
    source file("src/main/avro")
    source file("build/generated-avro-main-avpr")
    include("**/*.avpr")
    outputDir = file("build/generated-main-avro-avsc")
}
```


================================================
FILE: RELEASING.md
================================================
# Release Process

1. Update `CHANGES.md`
1. Ensure that there is a milestone for the version, and that appropriate issues are associated with the milestone.
1. Update the plugin version in `build.gradle` under "version"
1. Commit and tag with the version number (don't push yet)
1. Run `./gradlew clean build` to make sure it looks good.
1. Update the version in `build.gradle` to the next SNAPSHOT and commit.
1. Push
1. If there was a issue requesting the release, close it.
1. Close the milestone.
1. Go to the [GitHub Releases page](https://github.com/davidmc24/gradle-avro-plugin/releases), click "Draft a new release", select the tag version, use the version number as the title, copy the relevant segment from `CHANGES.md` into the description, and click "Publish release".  This will trigger the CI job that does the actual publishing.


================================================
FILE: build.gradle
================================================
plugins {
    id "groovy"
    id "checkstyle"
    id "codenarc"
    id "idea"
//    id "jacoco"
    id "maven-publish"
    id "signing"
    id "java-gradle-plugin"
    id "org.nosphere.gradle.github.actions" version "1.2.0"
    id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
//    id "pl.droidsonroids.jacoco.testkit" version "1.0.8"
}

// Gradle TestKit (which most of this plugins tests run using) runs the builds in a separate
// JVM than the tests.  Thus, for Jacoco to pick up on it, you need to do some extra legwork.
// https://github.com/koral--/jacoco-gradle-testkit-plugin seeks to solve that
// However, Gradle 7.1 doesn't currently support the combination of the configuration cache
// with a Java agent (such as Jacoco) and TestKit.
// Thus, for now, no coverage reporting, as I place a higher value on testing configuration cache
// support.

group = "com.github.davidmc24.gradle.plugin"
version = "1.9.2-SNAPSHOT"

def isCI = System.getenv("CI") == "true"

repositories {
    mavenCentral()
    maven {
        // Used for snapshot builds for some libraries
        name 'Sonatype OSS'
        url 'https://oss.sonatype.org/content/repositories/snapshots'
    }
}

def compileAvroVersion = "1.11.3"

// Write the plugin's classpath to a file to share with the tests
task createClasspathManifest {
    def outputDir = file("$buildDir/$name")

    inputs.files sourceSets.main.runtimeClasspath
    outputs.dir outputDir

    doLast {
        outputDir.mkdirs()
        file("$outputDir/plugin-classpath.txt").text = sourceSets.main.runtimeClasspath.join("\n")
    }
}

dependencies {
    implementation localGroovy()
    implementation "org.apache.avro:avro-compiler:${compileAvroVersion}"
    constraints {
        implementation ('com.fasterxml.jackson.core:jackson-databind:2.12.7.1') {
            because 'previous versions have vulnerabilities: CVE-2022-42004, CVE-2022-42003'
        }
        implementation ('org.apache.commons:commons-text:1.10.0') {
            because 'previous versions have vulnerability: CVE-2022-42889'
        }
        implementation ('org.apache.commons:commons-compress:1.24.0') {
            because 'previous versions have vulnerability: CVE-2023-42503'
        }
    }
    testImplementation "org.spockframework:spock-core:2.0-M5-groovy-3.0"
    testImplementation gradleTestKit()
    testImplementation "uk.co.datumedge:hamcrest-json:0.2"
    testImplementation "com.vdurmont:semver4j:3.1.0"
    testRuntimeOnly files(createClasspathManifest) // Add the classpath file to the test runtime classpath
    // tool version specified in dependencies in order to override Groovy version for Java compatibility
    codenarc "org.codenarc:CodeNarc:2.2.0"
    codenarc "org.codehaus.groovy:groovy-all:3.0.9"
}

tasks.withType(AbstractCompile) {
    options.encoding = "UTF-8"
}
tasks.withType(JavaCompile) {
    options.compilerArgs << "-Xlint:all" << "-Xlint:-options" << "-Werror"
}

tasks.withType(AbstractArchiveTask) {
    preserveFileTimestamps = false
    reproducibleFileOrder = true
}

java {
    withJavadocJar()
    withSourcesJar()
}

javadoc {
    if(JavaVersion.current().isJava9Compatible()) {
        options.addBooleanOption('html5', true)
    }
    options.addStringOption('Xdoclint:none', '-quiet')
}

publishing {
    publications.withType(MavenPublication) {
        pom {
            name = "gradle-avro-plugin"
            description = "A Gradle plugin to allow easily performing Java code generation for Apache Avro. It supports JSON schema declaration files, JSON protocol declaration files, and Avro IDL files."
            url = "https://github.com/davidmc24/gradle-avro-plugin"
            licenses {
                license {
                    name = "The Apache License, Version 2.0"
                    url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
                }
            }
            developers {
                developer {
                    id = 'davidmc24'
                    name = 'David M. Carr'
                    email = 'david@carrclan.us'
                }
            }
            scm {
                connection = 'scm:git:https://github.com/davidmc24/gradle-avro-plugin.git'
                developerConnection = 'scm:git:ssh://github.com/davidmc24/gradle-avro-plugin.git'
                url = 'https://github.com/davidmc24/gradle-avro-plugin'
            }
        }
    }
}

nexusPublishing {
    repositories {
        sonatype()
    }
}

signing {
    if (isCI) {
        def signingKeyId = System.getenv("SIGNING_KEY_ID")
        def signingKey = System.getenv("SIGNING_KEY")
        def signingPassword = System.getenv("SIGNING_PASSWORD")
        useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
    }
    publishing.publications.all { publication ->
        sign publication
    }
}

gradlePlugin {
    plugins {
        avro {
            id = "com.github.davidmc24.gradle.plugin.avro"
            implementationClass = "com.github.davidmc24.gradle.plugin.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"
            displayName = "avro-base"
            description = "Capabilities plugin for gradle-avro-plugin"
        }
    }
}

idea {
    project {
        vcs = "Git"
        ipr {
            withXml { provider ->
                def node = provider.asNode()
                node.append(new XmlParser().parseText("""
                <component name="ProjectCodeStyleSettingsManager">
                    <option name="PER_PROJECT_SETTINGS">
                        <value>
                            <option name="LINE_SEPARATOR" value="&#10;"/>
                            <option name="RIGHT_MARGIN" value="140"/>
                        </value>
                    </option>
                    <option name="USE_PER_PROJECT_SETTINGS" value="true"/>
                </component>
                """.stripIndent()))
            }
        }
    }
}

checkstyle {
    ignoreFailures = false
    maxErrors = 0
    maxWarnings = 0
    showViolations = true
    toolVersion = "8.23"
}
// In Gradle 4.8 the checkstyle basedir changed to no longer be the project root by default; thus we need to specify
checkstyleMain {
    configProperties = ['basedir': "$rootDir/config/checkstyle"]
}
checkstyleTest {
    configProperties = ['basedir': "$rootDir/config/checkstyle"]
}

codenarc {
    config = project.resources.text.fromFile("config/codenarc/codenarc.groovy")
    ignoreFailures = false
    maxPriority1Violations = 0
    maxPriority2Violations = 0
    maxPriority3Violations = 0
    // tool version specified in dependencies in order to override Groovy version for Java compatibility
//    toolVersion = "2.2.0"
}

// Java 8+ is required due to requirements introduced in Avro 1.9.0
// Java 8+ is also required by Gradle 5.x
if (JavaVersion.current().java10Compatible) {
    compileJava {
        options.release = 8
    }
} else {
    sourceCompatibility = 8
}

test {
    useJUnitPlatform()
    systemProperties = [
        avroVersion: compileAvroVersion,
        gradleVersion: gradle.gradleVersion,
    ]
//    finalizedBy jacocoTestReport // report is always generated after tests run
}

tasks.create(name: "testCompatibility", type: Test) {
    description = "Test cross-compatibility of the plugin with Avro/Gradle"
    group = "Verification"
    useJUnitPlatform()
    systemProperties = [
        avroVersion: findProperty("avroVersion"),
        gradleVersion: findProperty("gradleVersion"),
    ]
    reports {
        html.destination = file("$buildDir/reports/tests/compatibility")
        junitXml.destination = file("$buildDir/reports/tests/compatibility")
    }
}

//jacoco {
//    // 0.8.7+ needed for Java 15 support
//    // See https://www.jacoco.org/jacoco/trunk/doc/changes.html
//    toolVersion = "0.8.7-SNAPSHOT"
//}

//jacocoTestReport {
//    reports {
//        html.enabled true
//        xml.enabled true
//    }
//}

tasks.withType(Test) {
    jvmArgs "-Xss320k"
    minHeapSize "120m"
    maxHeapSize "280m"
    maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}


================================================
FILE: config/checkstyle/checkstyle.xml
================================================
<!DOCTYPE module PUBLIC
    "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
    "https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">

    <module name="TreeWalker">
        <module name="Indentation"/>

        <!-- Annotations -->
        <module name="AnnotationLocation"/>
        <module name="AnnotationUseStyle"/>
        <module name="MissingDeprecated"/>
        <module name="MissingOverride"/>
        <module name="PackageAnnotation"/>

        <!-- Blocks -->
        <module name="AvoidNestedBlocks"/>
        <module name="EmptyBlock">
            <!-- Explicitly configure to avoid checking for catch blocks, which is handled differently in later versions -->
            <property name="tokens" value="LITERAL_WHILE,LITERAL_TRY,LITERAL_FINALLY,LITERAL_DO,LITERAL_IF,LITERAL_ELSE,LITERAL_FOR,STATIC_INIT,LITERAL_SWITCH"/>
        </module>
        <module name="EmptyCatchBlock">
            <property name="exceptionVariableName" value="expected|ignore"/>
        </module>
        <module name="LeftCurly"/>
        <module name="NeedBraces"/>
        <module name="RightCurly"/>

        <!-- Class Design -->
        <module name="InnerTypeLast"/>
        <module name="OneTopLevelClass"/>

        <!-- Coding -->
        <module name="ArrayTrailingComma"/>
        <module name="CovariantEquals"/>
        <module name="DeclarationOrder"/>
        <module name="DefaultComesLast"/>
        <module name="EmptyStatement"/>
        <module name="EqualsAvoidNull"/>
        <module name="EqualsHashCode"/>
        <module name="ExplicitInitialization"/>
        <module name="FallThrough"/>
        <module name="HiddenField">
            <property name="ignoreConstructorParameter" value="true"/>
            <property name="ignoreSetter" value="true"/>
        </module>
        <module name="IllegalCatch"/>
        <module name="IllegalThrows"/>
        <module name="IllegalType"/>
        <module name="InnerAssignment"/>
        <module name="MagicNumber">
            <property name="ignoreHashCodeMethod" value="true"/>
            <property name="ignoreAnnotation" value="true"/>
        </module>
        <module name="MissingSwitchDefault"/>
        <module name="ModifiedControlVariable"/>
        <module name="MultipleVariableDeclarations"/>
        <module name="NestedForDepth"/>
        <module name="NestedIfDepth">
            <property name="max" value="2"/>
        </module>
        <module name="NestedTryDepth"/>
        <module name="NoClone"/>
        <module name="NoFinalizer"/>
        <module name="OneStatementPerLine"/>
        <module name="OverloadMethodsDeclarationOrder"/>
        <module name="PackageDeclaration"/>
        <module name="ParameterAssignment"/>
        <module name="SimplifyBooleanExpression"/>
        <module name="SimplifyBooleanReturn"/>
        <module name="StringLiteralEquality"/>
        <module name="SuperClone"/>
        <module name="SuperFinalize"/>
        <module name="UnnecessaryParentheses"/>
        <module name="UnnecessarySemicolonInEnumeration"/>
        <module name="UnnecessarySemicolonInTryWithResources"/>

        <!-- Imports -->
        <module name="AvoidStarImport"/>
        <module name="IllegalImport"/>
        <module name="ImportControl">
            <property name="file" value="${basedir}/import-control.xml"/>
        </module>
        <module name="ImportOrder">
            <property name="option" value="bottom"/>
            <property name="ordered" value="true"/>
            <property name="separated" value="true"/>
        </module>
        <module name="RedundantImport"/>
        <module name="UnusedImports"/>

        <!-- Miscellaneous -->
        <module name="ArrayTypeStyle"/>
        <module name="AvoidEscapedUnicodeCharacters"/>
        <module name="CommentsIndentation"/>
        <module name="Indentation"/>
        <module name="OuterTypeFilename"/>
        <module name="UpperEll"/>

        <!-- Modifiers -->
        <module name="ModifierOrder"/>
        <module name="RedundantModifier"/>

        <!-- Sizes -->
        <module name="LineLength">
            <property name="max" value="140"/>
        </module>

        <!-- Whitespace -->
        <module name="GenericWhitespace"/>
        <module name="EmptyForInitializerPad"/>
        <module name="EmptyForIteratorPad"/>
        <module name="MethodParamPad"/>
        <module name="NoWhitespaceAfter"/>
        <module name="NoWhitespaceBefore"/>
        <module name="OperatorWrap"/>
        <module name="ParenPad"/>
        <module name="TypecastParenPad"/>
        <module name="WhitespaceAfter"/>
        <module name="WhitespaceAround">
            <property name="allowEmptyConstructors" value="true"/>
            <property name="allowEmptyMethods" value="true"/>
        </module>

        <module name="SuppressWarningsHolder"/>
    </module>

    <!-- Miscellaneous -->
    <module name="NewlineAtEndOfFile">
        <property name="lineSeparator" value="lf"/>
    </module>
    <module name="OrderedProperties"/>

    <!-- Whitespace -->
    <module name="FileTabCharacter"/>

    <!-- Leftover code templates -->
    <module name="RegexpSingleline">
        <property name="format" value="File \| Settings \| File Templates"/>
    </module>
    <module name="RegexpSingleline">
        <property name="format" value="Created with IntelliJ IDEA"/>
    </module>

    <module name="SuppressWarningsFilter"/>

</module>


================================================
FILE: config/checkstyle/import-control.xml
================================================
<!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"/>

    <allow pkg="java.io"/>
    <allow pkg="java.lang"/>
    <allow pkg="java.net"/>
    <allow pkg="java.nio.charset"/>
    <allow pkg="java.nio.file"/>
    <allow pkg="java.util"/>
    <allow pkg="java.util.concurrent"/>
    <allow pkg="javax.annotation"/>
    <allow pkg="javax.inject"/>

    <allow pkg="org.apache.avro"/>
    <allow pkg="org.apache.avro.compiler.idl"/>
    <allow pkg="org.apache.avro.compiler.specific"/>
    <allow pkg="org.apache.avro.generic"/>

    <allow pkg="org.gradle.api"/>
    <allow pkg="org.gradle.plugins.ide.idea"/>
    <allow pkg="org.gradle.util"/>
</import-control>


================================================
FILE: config/codenarc/codenarc.groovy
================================================
ruleset {

    // rulesets/basic.xml
    AssertWithinFinallyBlock
    AssignmentInConditional
    BigDecimalInstantiation
    BitwiseOperatorInConditional
    BooleanGetBoolean
    BrokenNullCheck
    BrokenOddnessCheck
    ClassForName
    ComparisonOfTwoConstants
    ComparisonWithSelf
    ConstantAssertExpression
    ConstantIfExpression
    ConstantTernaryExpression
    DeadCode
    DoubleNegative
    DuplicateCaseStatement
    DuplicateMapKey
    DuplicateSetValue
    EmptyCatchBlock
    EmptyClass
    EmptyElseBlock
    EmptyFinallyBlock
    EmptyForStatement
    EmptyIfStatement
    EmptyInstanceInitializer
    EmptyMethod
    EmptyStaticInitializer
    EmptySwitchStatement
    EmptySynchronizedStatement
    EmptyTryBlock
    EmptyWhileStatement
    EqualsAndHashCode
    EqualsOverloaded
    ExplicitGarbageCollection
    ForLoopShouldBeWhileLoop
    HardCodedWindowsFileSeparator
    HardCodedWindowsRootDirectory
    IntegerGetInteger
    RandomDoubleCoercedToZero
    RemoveAllOnSelf
    ReturnFromFinallyBlock
    ThrowExceptionFromFinallyBlock

    // rulesets/braces.xml
    ElseBlockBraces
    ForStatementBraces
    IfStatementBraces
    WhileStatementBraces

    // rulesets/concurrency.xml
    BusyWait
    DoubleCheckedLocking
    InconsistentPropertyLocking
    InconsistentPropertySynchronization
    NestedSynchronization
    StaticCalendarField
    StaticConnection
    StaticDateFormatField
    StaticMatcherField
    StaticSimpleDateFormatField
    SynchronizedMethod
    SynchronizedOnBoxedPrimitive
    SynchronizedOnGetClass
    SynchronizedOnReentrantLock
    SynchronizedOnString
    SynchronizedOnThis
    SynchronizedReadObjectMethod
    SystemRunFinalizersOnExit
    ThisReferenceEscapesConstructor
    ThreadGroup
    ThreadLocalNotStaticFinal
    ThreadYield
    UseOfNotifyMethod
    VolatileArrayField
    VolatileLongOrDoubleField
    WaitOutsideOfWhileLoop

    // rulesets/convention.xml
    ConfusingTernary
    CouldBeElvis
    HashtableIsObsolete
    IfStatementCouldBeTernary
    InvertedIfElse
    LongLiteralWithLowerCaseL
    ParameterReassignment
    TernaryCouldBeElvis
    VectorIsObsolete

    // rulesets/design.xml
    AbstractClassWithPublicConstructor
    BooleanMethodReturnsNull
    BuilderMethodWithSideEffects
    CloneableWithoutClone
    CloseWithoutCloseable
    CompareToWithoutComparable
    ConstantsOnlyInterface
    EmptyMethodInAbstractClass
    FinalClassWithProtectedMember
    ImplementationAsType
    LocaleSetDefault
    PrivateFieldCouldBeFinal
    PublicInstanceField
    ReturnsNullInsteadOfEmptyArray
    ReturnsNullInsteadOfEmptyCollection
    SimpleDateFormatMissingLocale
    StatelessSingleton

    // rulesets/exceptions.xml
    CatchArrayIndexOutOfBoundsException
    CatchError
    CatchException
    CatchIllegalMonitorStateException
    CatchIndexOutOfBoundsException
    CatchNullPointerException
    CatchRuntimeException
    CatchThrowable
    ConfusingClassNamedException
    ExceptionExtendsError
    ExceptionNotThrown
    MissingNewInThrowStatement
    ReturnNullFromCatchBlock
    SwallowThreadDeath
    ThrowError
    ThrowException
    ThrowNullPointerException
    ThrowRuntimeException
    ThrowThrowable

    // rulesets/formatting.xml
    BracesForClass
    BracesForForLoop
    BracesForIfElse
    BracesForMethod
    BracesForTryCatchFinally
    ClosureStatementOnOpeningLineOfMultipleLineClosure
    LineLength (length: 140)
    SpaceAfterCatch
    SpaceAfterClosingBrace
    SpaceAfterComma
    SpaceAfterFor
    SpaceAfterIf
    SpaceAfterOpeningBrace
    SpaceAfterSemicolon
    SpaceAfterSwitch
    SpaceAfterWhile
    SpaceAroundClosureArrow
    SpaceAroundMapEntryColon (characterAfterColonRegex: /\s/)
    SpaceAroundOperator
    SpaceBeforeClosingBrace
    SpaceBeforeOpeningBrace

    // rulesets/generic.xml
    IllegalClassMember
    IllegalClassReference
    IllegalPackageReference
    IllegalRegex
    IllegalString
    RequiredRegex
    RequiredString
    StatelessClass

    // rulesets/groovyism.xml
    AssignCollectionSort
    AssignCollectionUnique
    ClosureAsLastMethodParameter
    CollectAllIsDeprecated
    ConfusingMultipleReturns
    ExplicitArrayListInstantiation
    ExplicitCallToAndMethod
    ExplicitCallToCompareToMethod
    ExplicitCallToDivMethod
    ExplicitCallToEqualsMethod
    ExplicitCallToGetAtMethod
    ExplicitCallToLeftShiftMethod
    ExplicitCallToMinusMethod
    ExplicitCallToModMethod
    ExplicitCallToMultiplyMethod
    ExplicitCallToOrMethod
    ExplicitCallToPlusMethod
    ExplicitCallToPowerMethod
    ExplicitCallToRightShiftMethod
    ExplicitCallToXorMethod
    ExplicitHashMapInstantiation
    ExplicitHashSetInstantiation
    ExplicitLinkedHashMapInstantiation
    ExplicitLinkedListInstantiation
    ExplicitStackInstantiation
    ExplicitTreeSetInstantiation
    GStringAsMapKey
    GStringExpressionWithinString
    GetterMethodCouldBeProperty
    GroovyLangImmutable
    UseCollectMany
    UseCollectNested

    // rulesets/imports.xml
    DuplicateImport
    ImportFromSamePackage
    ImportFromSunPackages
    MisorderedStaticImports (comesBefore: false)
    UnnecessaryGroovyImport
    UnusedImport

    // rulesets/junit.xml
    ChainedTest
    CoupledTestCase
    JUnitAssertAlwaysFails
    JUnitAssertAlwaysSucceeds
    JUnitFailWithoutMessage
    JUnitLostTest
    JUnitPublicField
    // Triggers incorrectly for Spock methods
    // JUnitPublicNonTestMethod
    JUnitSetUpCallsSuper
    JUnitStyleAssertions
    JUnitTearDownCallsSuper
    JUnitTestMethodWithoutAssert
    JUnitUnnecessarySetUp
    JUnitUnnecessaryTearDown
    JUnitUnnecessaryThrowsException
    SpockIgnoreRestUsed
    UnnecessaryFail
    UseAssertEqualsInsteadOfAssertTrue
    UseAssertFalseInsteadOfNegation
    UseAssertNullInsteadOfAssertEquals
    UseAssertSameInsteadOfAssertTrue
    UseAssertTrueInsteadOfAssertEquals
    UseAssertTrueInsteadOfNegation

    // rulesets/logging.xml
    LoggerForDifferentClass
    LoggerWithWrongModifiers
    LoggingSwallowsStacktrace
    MultipleLoggers
    PrintStackTrace
    Println
    SystemErrPrint
    SystemOutPrint

    // rulesets/naming.xml
    AbstractClassName
    ClassName
    ClassNameSameAsFilename
    ConfusingMethodName
    FieldName
    InterfaceName
    ObjectOverrideMisspelledMethodName
    PackageName
    ParameterName
    PropertyName
    VariableName

    // rulesets/security.xml
    FileCreateTempFile
    InsecureRandom
    NonFinalPublicField
    NonFinalSubclassOfSensitiveInterface
    ObjectFinalize
    PublicFinalizeMethod
    SystemExit
    UnsafeArrayDeclaration

    // rulesets/serialization.xml
    EnumCustomSerializationIgnored
    SerialPersistentFields
    SerialVersionUID
    SerializableClassMustDefineSerialVersionUID

    // rulesets/size.xml
    ClassSize
    MethodCount
    MethodSize
    NestedBlockDepth

    // rulesets/unnecessary.xml
    AddEmptyString
    ConsecutiveLiteralAppends
    ConsecutiveStringConcatenation
    UnnecessaryBigDecimalInstantiation
    UnnecessaryBigIntegerInstantiation
    UnnecessaryBooleanExpression
    UnnecessaryBooleanInstantiation
    UnnecessaryCallForLastElement
    UnnecessaryCallToSubstring
    UnnecessaryCatchBlock
    UnnecessaryCollectCall
    UnnecessaryCollectionCall
    UnnecessaryConstructor
    UnnecessaryDefInFieldDeclaration
    UnnecessaryDefInMethodDeclaration
    UnnecessaryDefInVariableDeclaration
    UnnecessaryDotClass
    UnnecessaryDoubleInstantiation
    UnnecessaryElseStatement
    UnnecessaryFinalOnPrivateMethod
    UnnecessaryFloatInstantiation
    UnnecessaryGetter
    UnnecessaryIfStatement
    UnnecessaryInstanceOfCheck
    UnnecessaryInstantiationToGetClass
    UnnecessaryIntegerInstantiation
    UnnecessaryLongInstantiation
    UnnecessaryModOne
    UnnecessaryNullCheck
    UnnecessaryNullCheckBeforeInstanceOf
    // Unnecessarily complicates Spock assertions
    // UnnecessaryObjectReferences
    UnnecessaryOverridingMethod
    UnnecessaryPackageReference
    UnnecessaryParenthesesForMethodCallWithClosure
    UnnecessaryPublicModifier
    UnnecessarySelfAssignment
    UnnecessarySemicolon
    UnnecessaryStringInstantiation
    UnnecessaryTernaryExpression
    UnnecessaryTransientModifier

    // rulesets/unused.xml
    UnusedArray
    UnusedMethodParameter
    UnusedObject
    UnusedPrivateField
    UnusedPrivateMethod
    UnusedPrivateMethodParameter
    UnusedVariable
}


================================================
FILE: design-docs/configurations-for-additional-schema.md
================================================
Periodically, we get requests for help figuring out how to
load schema files from a JAR, whether it is a JAR from a
repository or the outputs of a subproject.

`examples/avsc-from-subproject` gives an example of how
this can be configured based on a new configuration.
We might want to consider having the Avro plugin create
and configure such configurations as part of the
conventional usage pattern.

If we do this, a few gotchas:

1. We need to take into account all sourceSets (main, test, etc.)
2. We need to consider the naming so it's clear what the
   configurations are for and don't conflict with other plugins.
   For example, `additionalSchema` is too ambiguous.
   `additionalAvroSchema` might be better.
3. Whether it makes sense to exclude generated classes from jars


================================================
FILE: design-docs/external-schemata-and-protocols.md
================================================
Originally requested as [#4](https://github.com/davidmc24/gradle-avro-plugin/issues/4).
Some users would like the ability to have JAR files that contain Avro schema/protocol files, and have a way to declare a dependency on these, such that the plugin's generation capability can use them without needing to manual extract the archives.

Intended approach:

* The plugin defines a new `<sourceSetName>Avro` configuration for every source-set that it is working with.
* As with any configuration, the build script can define dependencies in the configuration, and the resolution mechanism will resolve the configuration against the configured repositories when it is resolved.
* A task would be added to extract all such archives to a `<buildDir>/unpacked-<sourceSetName>-avro` directory, per source-set
* The plugin's generation tasks would be configured to use the relevant unpacked directories as additional source directories.


================================================
FILE: design-docs/run-avro-as-an-external-process.md
================================================
Originally reported as [#27](https://github.com/davidmc24/gradle-avro-plugin/issues/27).
Currently, Avro generation takes by running the avro-compiler library as part of the Gradle plugin process.
This is simple and works, but has a few drawbacks:

* Custom templates need to be available on the classpath for the plugin, which isn't compatible with the new style of Gradle plugin declarations.
* The Gradle plugin may use a different version of Avro for generation than you're using on the compile classpath for compilation.

Instead, here is an alternative view of how it could work.

* There is an enhanced-avro-compiler library that externalizes most of the logic currently present in GenerateAvroJavaTask/GenerateAvroProtocolTask, and makes those calls accessible as JVM entry points (via `main` methods).
    * This library would be published on Maven Central, and potentially have multiple versions as needed for compatibility with multiple versions of Avro
    * It's possible we might be able to get this logic pushed upstream into avro-compiler, in which case the need for this library would be eliminated.
* For a source-set, the plugin would take a single declaration of the desired Avro version, which is then used for both generation and compilation
* The plugin would use a configuration per source-set to resolve the appropriate version of enhanced-avro-compiler
    * The build script could add additional dependencies to this configuration in order to pull in custom templates
* When doing generation, the plugin would use [JavaExec](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/JavaExec.html) to spawn a child JVM and execute the appropriate logic in enhanced-avro-compiler.


================================================
FILE: examples/avsc-from-external-jar/README.md
================================================
# Purpose

An example project for having dependencies on .avsc schema files loaded from an external JAR file
(not produced by the current Gradle project).

# Maintainer Notes

* Command to create JAR: `(cd external-files && jar --create --no-manifest --file ../external-libs/schema.jar Breed.avsc)`


================================================
FILE: examples/avsc-from-external-jar/build.gradle
================================================
plugins {
    id "com.github.davidmc24.gradle.plugin.avro" version "1.2.1"
}

repositories {
    mavenCentral()
}
dependencies {
    implementation "org.apache.avro:avro:1.10.1"
}

generateAvroJava {
    source zipTree("external-libs/schema.jar")
}


================================================
FILE: examples/avsc-from-external-jar/external-files/Breed.avsc
================================================
{
    "name": "Breed",
    "namespace": "example",
    "type": "enum",
    "symbols" : ["ABYSSINIAN", "AMERICAN_SHORTHAIR", "BIRMAN", "MAINE_COON", "ORIENTAL", "PERSIAN", "RAGDOLL", "SIAMESE", "SPHYNX"]
}


================================================
FILE: examples/avsc-from-external-jar/external-files/Cat.avsc
================================================
{
    "name": "Cat",
    "namespace": "example",
    "type": "record",
    "fields" : [
        {"name": "breed", "type": "Breed"}
    ]
}


================================================
FILE: examples/avsc-from-external-jar/gradle/wrapper/gradle-wrapper.properties
================================================
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists


================================================
FILE: examples/avsc-from-external-jar/gradlew
================================================
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
#
#   Gradle start up script for POSIX generated by Gradle.
#
#   Important for running:
#
#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
#       noncompliant, but you have some other compliant shell such as ksh or
#       bash, then to run this script, type that shell name before the whole
#       command line, like:
#
#           ksh Gradle
#
#       Busybox and similar reduced shells will NOT work, because this script
#       requires all of these POSIX shell features:
#         * functions;
#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
#         * compound commands having a testable exit status, especially «case»;
#         * various built-in commands including «command», «set», and «ulimit».
#
#   Important for patching:
#
#   (2) This script targets any POSIX shell, so it avoids extensions provided
#       by Bash, Ksh, etc; in particular arrays are avoided.
#
#       The "traditional" practice of packing multiple parameters into a
#       space-separated string is a well documented source of bugs and security
#       problems, so this is (mostly) avoided, by progressively accumulating
#       options in "$@", and eventually passing that to Java.
#
#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
#       see the in-line comments for details.
#
#       There are tweaks for specific operating systems such as AIX, CygWin,
#       Darwin, MinGW, and NonStop.
#
#   (3) This script is generated from the Groovy template
#       https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
#       within the Gradle project.
#
#       You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################

# Attempt to set APP_HOME

# Resolve links: $0 may be a link
app_path=$0

# Need this for daisy-chained symlinks.
while
    APP_HOME=${app_path%"${app_path##*/}"}  # leaves a trailing /; empty if no leading path
    [ -h "$app_path" ]
do
    ls=$( ls -ld "$app_path" )
    link=${ls#*' -> '}
    case $link in             #(
      /*)   app_path=$link ;; #(
      *)    app_path=$APP_HOME$link ;;
    esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

warn () {
    echo "$*"
} >&2

die () {
    echo
    echo "$*"
    echo
    exit 1
} >&2

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in                #(
  CYGWIN* )         cygwin=true  ;; #(
  Darwin* )         darwin=true  ;; #(
  MSYS* | MINGW* )  msys=true    ;; #(
  NONSTOP* )        nonstop=true ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD=$JAVA_HOME/jre/sh/java
    else
        JAVACMD=$JAVA_HOME/bin/java
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD=java
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
    case $MAX_FD in #(
      max*)
        MAX_FD=$( ulimit -H -n ) ||
            warn "Could not query maximum file descriptor limit"
    esac
    case $MAX_FD in  #(
      '' | soft) :;; #(
      *)
        ulimit -n "$MAX_FD" ||
            warn "Could not set maximum file descriptor limit to $MAX_FD"
    esac
fi

# Collect all arguments for the java command, stacking in reverse order:
#   * args from the command line
#   * the main class name
#   * -classpath
#   * -D...appname settings
#   * --module-path (only if needed)
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.

# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
    APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
    CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )

    JAVACMD=$( cygpath --unix "$JAVACMD" )

    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    for arg do
        if
            case $arg in                                #(
              -*)   false ;;                            # don't mess with options #(
              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath
                    [ -e "$t" ] ;;                      #(
              *)    false ;;
            esac
        then
            arg=$( cygpath --path --ignore --mixed "$arg" )
        fi
        # Roll the args list around exactly as many times as the number of
        # args, so each arg winds up back in the position where it started, but
        # possibly modified.
        #
        # NB: a `for` loop captures its iteration list before it begins, so
        # changing the positional parameters here affects neither the number of
        # iterations, nor the values presented in `arg`.
        shift                   # remove old arg
        set -- "$@" "$arg"      # push replacement arg
    done
fi

# Collect all arguments for the java command;
#   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
#     shell script including quotes and variable substitutions, so put them in
#     double quotes to make sure that they get re-expanded; and
#   * put everything else in single quotes, so that it's not re-expanded.

set -- \
        "-Dorg.gradle.appname=$APP_BASE_NAME" \
        -classpath "$CLASSPATH" \
        org.gradle.wrapper.GradleWrapperMain \
        "$@"

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
#   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
#   set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#

eval "set -- $(
        printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
        xargs -n1 |
        sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
        tr '\n' ' '
    )" '"$@"'

exec "$JAVACMD" "$@"


================================================
FILE: examples/avsc-from-external-jar/gradlew.bat
================================================
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem      https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega


================================================
FILE: examples/avsc-from-external-jar/settings.gradle
================================================
pluginManagement {
    repositories {
        gradlePluginPortal()
        mavenCentral()
        mavenLocal()
    }
}

rootProject.name = "avsc-from-external-jar"


================================================
FILE: examples/avsc-from-external-jar/src/main/avro/Cat.avsc
================================================
{
    "name": "Cat",
    "namespace": "example",
    "type": "record",
    "fields" : [
        {"name": "breed", "type": "Breed"}
    ]
}


================================================
FILE: examples/avsc-from-subproject/README.md
================================================
# Purpose

An example project for having dependencies on .avsc schema files loaded from an JAR file
produced by a subproject of the current multi-project Gradle build.

# Variants
            
## schema project JAR doesn't contain classes

If you'd rather have the `schema` project **not** generate Java classes, you can rename `src/main/avro` to `src/main/resources`.
In that case, you can also replace the Avro plugin with the `java` plugin.


================================================
FILE: examples/avsc-from-subproject/cat/build.gradle
================================================
import java.util.zip.ZipFile

plugins {
    id "com.github.davidmc24.gradle.plugin.avro" version "1.2.1"
}

repositories {
    mavenCentral()
}
configurations {
    additionalSchema
}
dependencies {
    implementation "org.apache.avro:avro:1.10.1"
    additionalSchema project(":schema")
}

generateAvroJava {
    dependsOn configurations.additionalSchema
    source {
        // As of Gradle 7.2, Using zipTree within source appears to disable build caching
        configurations.additionalSchema.collect { zipTree(it) }
    }
}

def configureJar = tasks.register("configureJar") {
    it.doLast {
        // Exclude classes that are already in schema.jar from this jar
        tasks.jar.exclude(
            configurations.additionalSchema
                .findAll { it.name.endsWith("jar") }
                .collect { File file ->
                    new ZipFile(file).entries()
                        .findAll { it.name.endsWith(".class") }
                        .collect { it.name }
                }
                .flatten()
        )
    }
    // otherwise the jars of dependent projects might not have been built
    // TODO is there a way to copy the dependencies of the jar task? classes is not part of tasks.jar.dependsOn
    it.dependsOn(tasks.classes)
}

tasks.named("jar") {
    it.dependsOn(configureJar)
}


================================================
FILE: examples/avsc-from-subproject/cat/src/main/avro/Cat.avsc
================================================
{
    "name": "Cat",
    "namespace": "example",
    "type": "record",
    "fields" : [
        {"name": "breed", "type": "Breed"}
    ]
}


================================================
FILE: examples/avsc-from-subproject/gradle/wrapper/gradle-wrapper.properties
================================================
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists


================================================
FILE: examples/avsc-from-subproject/gradlew
================================================
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
#
#   Gradle start up script for POSIX generated by Gradle.
#
#   Important for running:
#
#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
#       noncompliant, but you have some other compliant shell such as ksh or
#       bash, then to run this script, type that shell name before the whole
#       command line, like:
#
#           ksh Gradle
#
#       Busybox and similar reduced shells will NOT work, because this script
#       requires all of these POSIX shell features:
#         * functions;
#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
#         * compound commands having a testable exit status, especially «case»;
#         * various built-in commands including «command», «set», and «ulimit».
#
#   Important for patching:
#
#   (2) This script targets any POSIX shell, so it avoids extensions provided
#       by Bash, Ksh, etc; in particular arrays are avoided.
#
#       The "traditional" practice of packing multiple parameters into a
#       space-separated string is a well documented source of bugs and security
#       problems, so this is (mostly) avoided, by progressively accumulating
#       options in "$@", and eventually passing that to Java.
#
#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
#       see the in-line comments for details.
#
#       There are tweaks for specific operating systems such as AIX, CygWin,
#       Darwin, MinGW, and NonStop.
#
#   (3) This script is generated from the Groovy template
#       https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
#       within the Gradle project.
#
#       You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################

# Attempt to set APP_HOME

# Resolve links: $0 may be a link
app_path=$0

# Need this for daisy-chained symlinks.
while
    APP_HOME=${app_path%"${app_path##*/}"}  # leaves a trailing /; empty if no leading path
    [ -h "$app_path" ]
do
    ls=$( ls -ld "$app_path" )
    link=${ls#*' -> '}
    case $link in             #(
      /*)   app_path=$link ;; #(
      *)    app_path=$APP_HOME$link ;;
    esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

warn () {
    echo "$*"
} >&2

die () {
    echo
    echo "$*"
    echo
    exit 1
} >&2

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in                #(
  CYGWIN* )         cygwin=true  ;; #(
  Darwin* )         darwin=true  ;; #(
  MSYS* | MINGW* )  msys=true    ;; #(
  NONSTOP* )        nonstop=true ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD=$JAVA_HOME/jre/sh/java
    else
        JAVACMD=$JAVA_HOME/bin/java
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD=java
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
    case $MAX_FD in #(
      max*)
        MAX_FD=$( ulimit -H -n ) ||
            warn "Could not query maximum file descriptor limit"
    esac
    case $MAX_FD in  #(
      '' | soft) :;; #(
      *)
        ulimit -n "$MAX_FD" ||
            warn "Could not set maximum file descriptor limit to $MAX_FD"
    esac
fi

# Collect all arguments for the java command, stacking in reverse order:
#   * args from the command line
#   * the main class name
#   * -classpath
#   * -D...appname settings
#   * --module-path (only if needed)
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.

# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
    APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
    CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )

    JAVACMD=$( cygpath --unix "$JAVACMD" )

    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    for arg do
        if
            case $arg in                                #(
              -*)   false ;;                            # don't mess with options #(
              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath
                    [ -e "$t" ] ;;                      #(
              *)    false ;;
            esac
        then
            arg=$( cygpath --path --ignore --mixed "$arg" )
        fi
        # Roll the args list around exactly as many times as the number of
        # args, so each arg winds up back in the position where it started, but
        # possibly modified.
        #
        # NB: a `for` loop captures its iteration list before it begins, so
        # changing the positional parameters here affects neither the number of
        # iterations, nor the values presented in `arg`.
        shift                   # remove old arg
        set -- "$@" "$arg"      # push replacement arg
    done
fi

# Collect all arguments for the java command;
#   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
#     shell script including quotes and variable substitutions, so put them in
#     double quotes to make sure that they get re-expanded; and
#   * put everything else in single quotes, so that it's not re-expanded.

set -- \
        "-Dorg.gradle.appname=$APP_BASE_NAME" \
        -classpath "$CLASSPATH" \
        org.gradle.wrapper.GradleWrapperMain \
        "$@"

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
#   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
#   set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#

eval "set -- $(
        printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
        xargs -n1 |
        sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
        tr '\n' ' '
    )" '"$@"'

exec "$JAVACMD" "$@"


================================================
FILE: examples/avsc-from-subproject/gradlew.bat
================================================
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem      https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega


================================================
FILE: examples/avsc-from-subproject/schema/build.gradle
================================================
plugins {
    id "com.github.davidmc24.gradle.plugin.avro" version "1.2.1"
}

repositories {
    mavenCentral()
}
dependencies {
    compileOnly "org.apache.avro:avro:1.10.1"
}

sourceSets {
    main {
        resources {
            srcDirs "src/main/avro"
        }
    }
}


================================================
FILE: examples/avsc-from-subproject/schema/src/main/avro/Breed.avsc
================================================
{
    "name": "Breed",
    "namespace": "example",
    "type": "enum",
    "symbols" : ["ABYSSINIAN", "AMERICAN_SHORTHAIR", "BIRMAN", "MAINE_COON", "ORIENTAL", "PERSIAN", "RAGDOLL", "SIAMESE", "SPHYNX"]
}


================================================
FILE: examples/avsc-from-subproject/settings.gradle
================================================
pluginManagement {
    repositories {
        gradlePluginPortal()
        mavenCentral()
        mavenLocal()
    }
}

rootProject.name = "avsc-from-subproject"

include "schema"
include "cat"


================================================
FILE: examples/default-custom-types/README.md
================================================
This example demonstrates a custom plugin that registers a logical type factory and custom conversion.

To simplify the example, the custom conversion/logicalTypeFactory classes are duplicated in both buildSrc and the project.
In the real world, you would likely put them in a separate project, publish them as a JAR, and depend on them in both places.


================================================
FILE: examples/default-custom-types/build.gradle
================================================
apply plugin: custom.AvroConventionPlugin

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.apache.avro:avro:1.11.0'
}


================================================
FILE: examples/default-custom-types/buildSrc/build.gradle
================================================
repositories {
    mavenCentral()
}

dependencies {
    implementation 'com.github.davidmc24.gradle.plugin:gradle-avro-plugin:1.2.0'
    implementation 'org.apache.avro:avro:1.11.0'
}


================================================
FILE: examples/default-custom-types/buildSrc/src/main/java/custom/AvroConventionPlugin.java
================================================
package custom;

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;

public class AvroConventionPlugin implements Plugin<Project> {
    public void apply(Project project) {
        project.getPluginManager().apply(AvroPlugin.class);
        AvroExtension avroExtension = project.getExtensions().findByType(AvroExtension.class);
        avroExtension.logicalTypeFactory("timezone", TimeZoneLogicalTypeFactory.class);
        avroExtension.customConversion(TimeZoneConversion.class);
    }
}


================================================
FILE: examples/default-custom-types/buildSrc/src/main/java/custom/TimeZoneConversion.java
================================================
package custom;

import java.util.TimeZone;
import org.apache.avro.Conversion;
import org.apache.avro.LogicalType;
import org.apache.avro.Schema;

@SuppressWarnings("unused")
public class TimeZoneConversion extends Conversion<TimeZone> {
    public static final String LOGICAL_TYPE_NAME = "timezone";

    @Override
    public Class<TimeZone> getConvertedType() {
        return TimeZone.class;
    }

    @Override
    public String getLogicalTypeName() {
        return LOGICAL_TYPE_NAME;
    }

    @Override
    public TimeZone fromCharSequence(CharSequence value, Schema schema, LogicalType type) {
        return TimeZone.getTimeZone(value.toString());
    }

    @Override
    public CharSequence toCharSequence(TimeZone value, Schema schema, LogicalType type) {
        return value.getID();
    }

    @Override
    public Schema getRecommendedSchema() {
        return TimeZoneLogicalType.INSTANCE.addToSchema(Schema.create(Schema.Type.STRING));
    }
}


================================================
FILE: examples/default-custom-types/buildSrc/src/main/java/custom/TimeZoneLogicalType.java
================================================
package custom;

import org.apache.avro.LogicalType;
import org.apache.avro.Schema;

public class TimeZoneLogicalType extends LogicalType {
    static final TimeZoneLogicalType INSTANCE = new TimeZoneLogicalType();

    private TimeZoneLogicalType() {
        super(TimeZoneConversion.LOGICAL_TYPE_NAME);
    }

    @Override
    public void validate(Schema schema) {
        super.validate(schema);
        if (schema.getType() != Schema.Type.STRING) {
            throw new IllegalArgumentException("Timezone can only be used with an underlying string type");
        }
    }
}


================================================
FILE: examples/default-custom-types/buildSrc/src/main/java/custom/TimeZoneLogicalTypeFactory.java
================================================
package custom;

import org.apache.avro.LogicalType;
import org.apache.avro.LogicalTypes;
import org.apache.avro.Schema;

public class TimeZoneLogicalTypeFactory implements LogicalTypes.LogicalTypeFactory {
    @Override
    public LogicalType fromSchema(Schema schema) {
        return TimeZoneLogicalType.INSTANCE;
    }
}


================================================
FILE: examples/default-custom-types/gradle/wrapper/gradle-wrapper.properties
================================================
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists


================================================
FILE: examples/default-custom-types/gradlew
================================================
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn () {
    echo "$*"
}

die () {
    echo
    echo "$*"
    echo
    exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
  NONSTOP* )
    nonstop=true
    ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

    JAVACMD=`cygpath --unix "$JAVACMD"`

    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="$ROOTDIRS$SEP$dir"
        SEP="|"
    done
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    i=0
    for arg in "$@" ; do
        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option

        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
        else
            eval `echo args$i`="\"$arg\""
        fi
        i=`expr $i + 1`
    done
    case $i in
        0) set -- ;;
        1) set -- "$args0" ;;
        2) set -- "$args0" "$args1" ;;
        3) set -- "$args0" "$args1" "$args2" ;;
        4) set -- "$args0" "$args1" "$args2" "$args3" ;;
        5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
        6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
        7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
        8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
        9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    esac
fi

# Escape application args
save () {
    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
    echo " "
}
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

exec "$JAVACMD" "$@"


================================================
FILE: examples/default-custom-types/gradlew.bat
================================================
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem      https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega


================================================
FILE: examples/default-custom-types/settings.gradle
================================================
rootProject.name = 'default-custom-types'


================================================
FILE: examples/default-custom-types/src/main/avro/customConversion.avsc
================================================
{"namespace": "example",
 "type": "record",
 "name": "Event",
 "fields": [
     {"name": "name", "type": "string"},
     {"name": "start", "type": {"type": "long", "logicalType": "timestamp-millis"} },
     {"name": "timezone", "type": {"type": "string", "logicalType": "timezone"} }
 ]
}


================================================
FILE: examples/default-custom-types/src/main/java/custom/TimeZoneConversion.java
================================================
package custom;

import java.util.TimeZone;
import org.apache.avro.Conversion;
import org.apache.avro.LogicalType;
import org.apache.avro.Schema;

@SuppressWarnings("unused")
public class TimeZoneConversion extends Conversion<TimeZone> {
    public static final String LOGICAL_TYPE_NAME = "timezone";

    @Override
    public Class<TimeZone> getConvertedType() {
        return TimeZone.class;
    }

    @Override
    public String getLogicalTypeName() {
        return LOGICAL_TYPE_NAME;
    }

    @Override
    public TimeZone fromCharSequence(CharSequence value, Schema schema, LogicalType type) {
        return TimeZone.getTimeZone(value.toString());
    }

    @Override
    public CharSequence toCharSequence(TimeZone value, Schema schema, LogicalType type) {
        return value.getID();
    }

    @Override
    public Schema getRecommendedSchema() {
        return TimeZoneLogicalType.INSTANCE.addToSchema(Schema.create(Schema.Type.STRING));
    }
}


================================================
FILE: examples/default-custom-types/src/main/java/custom/TimeZoneLogicalType.java
================================================
package custom;

import org.apache.avro.LogicalType;
import org.apache.avro.Schema;

public class TimeZoneLogicalType extends LogicalType {
    static final TimeZoneLogicalType INSTANCE = new TimeZoneLogicalType();

    private TimeZoneLogicalType() {
        super(TimeZoneConversion.LOGICAL_TYPE_NAME);
    }

    @Override
    public void validate(Schema schema) {
        super.validate(schema);
        if (schema.getType() != Schema.Type.STRING) {
            throw new IllegalArgumentException("Timezone can only be used with an underlying string type");
        }
    }
}


================================================
FILE: examples/default-custom-types/src/main/java/custom/TimeZoneLogicalTypeFactory.java
================================================
package custom;

import org.apache.avro.LogicalType;
import org.apache.avro.LogicalTypes;
import org.apache.avro.Schema;

public class TimeZoneLogicalTypeFactory implements LogicalTypes.LogicalTypeFactory {
    @Override
    public LogicalType fromSchema(Schema schema) {
        return TimeZoneLogicalType.INSTANCE;
    }
}


================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists


================================================
FILE: gradle.properties
================================================
org.gradle.warning.mode=all
org.gradle.parallel=true
org.gradle.vfs.watch=true
systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false


================================================
FILE: gradlew
================================================
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
#
#   Gradle start up script for POSIX generated by Gradle.
#
#   Important for running:
#
#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
#       noncompliant, but you have some other compliant shell such as ksh or
#       bash, then to run this script, type that shell name before the whole
#       command line, like:
#
#           ksh Gradle
#
#       Busybox and similar reduced shells will NOT work, because this script
#       requires all of these POSIX shell features:
#         * functions;
#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
#         * compound commands having a testable exit status, especially «case»;
#         * various built-in commands including «command», «set», and «ulimit».
#
#   Important for patching:
#
#   (2) This script targets any POSIX shell, so it avoids extensions provided
#       by Bash, Ksh, etc; in particular arrays are avoided.
#
#       The "traditional" practice of packing multiple parameters into a
#       space-separated string is a well documented source of bugs and security
#       problems, so this is (mostly) avoided, by progressively accumulating
#       options in "$@", and eventually passing that to Java.
#
#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
#       see the in-line comments for details.
#
#       There are tweaks for specific operating systems such as AIX, CygWin,
#       Darwin, MinGW, and NonStop.
#
#   (3) This script is generated from the Groovy template
#       https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
#       within the Gradle project.
#
#       You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################

# Attempt to set APP_HOME

# Resolve links: $0 may be a link
app_path=$0

# Need this for daisy-chained symlinks.
while
    APP_HOME=${app_path%"${app_path##*/}"}  # leaves a trailing /; empty if no leading path
    [ -h "$app_path" ]
do
    ls=$( ls -ld "$app_path" )
    link=${ls#*' -> '}
    case $link in             #(
      /*)   app_path=$link ;; #(
      *)    app_path=$APP_HOME$link ;;
    esac
done

# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

warn () {
    echo "$*"
} >&2

die () {
    echo
    echo "$*"
    echo
    exit 1
} >&2

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in                #(
  CYGWIN* )         cygwin=true  ;; #(
  Darwin* )         darwin=true  ;; #(
  MSYS* | MINGW* )  msys=true    ;; #(
  NONSTOP* )        nonstop=true ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD=$JAVA_HOME/jre/sh/java
    else
        JAVACMD=$JAVA_HOME/bin/java
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD=java
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
    case $MAX_FD in #(
      max*)
        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
        # shellcheck disable=SC3045 
        MAX_FD=$( ulimit -H -n ) ||
            warn "Could not query maximum file descriptor limit"
    esac
    case $MAX_FD in  #(
      '' | soft) :;; #(
      *)
        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
        # shellcheck disable=SC3045 
        ulimit -n "$MAX_FD" ||
            warn "Could not set maximum file descriptor limit to $MAX_FD"
    esac
fi

# Collect all arguments for the java command, stacking in reverse order:
#   * args from the command line
#   * the main class name
#   * -classpath
#   * -D...appname settings
#   * --module-path (only if needed)
#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.

# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
    APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
    CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )

    JAVACMD=$( cygpath --unix "$JAVACMD" )

    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    for arg do
        if
            case $arg in                                #(
              -*)   false ;;                            # don't mess with options #(
              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath
                    [ -e "$t" ] ;;                      #(
              *)    false ;;
            esac
        then
            arg=$( cygpath --path --ignore --mixed "$arg" )
        fi
        # Roll the args list around exactly as many times as the number of
        # args, so each arg winds up back in the position where it started, but
        # possibly modified.
        #
        # NB: a `for` loop captures its iteration list before it begins, so
        # changing the positional parameters here affects neither the number of
        # iterations, nor the values presented in `arg`.
        shift                   # remove old arg
        set -- "$@" "$arg"      # push replacement arg
    done
fi

# Collect all arguments for the java command;
#   * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
#     shell script including quotes and variable substitutions, so put them in
#     double quotes to make sure that they get re-expanded; and
#   * put everything else in single quotes, so that it's not re-expanded.

set -- \
        "-Dorg.gradle.appname=$APP_BASE_NAME" \
        -classpath "$CLASSPATH" \
        org.gradle.wrapper.GradleWrapperMain \
        "$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
    die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
#   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
#   set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#

eval "set -- $(
        printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
        xargs -n1 |
        sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
        tr '\n' ' '
    )" '"$@"'

exec "$JAVACMD" "$@"


================================================
FILE: gradlew.bat
================================================
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem      https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega


================================================
FILE: scripts/run-avro-cli.sh
================================================
#!/usr/bin/env bash
set -ex
avroVersion=${1?"Usage: $0 AVRO_VERSION ARGUMENTS"};
shift
mkdir -p downloads
wget --timestamping --directory-prefix=downloads/ http://archive.apache.org/dist/avro/avro-${avroVersion}/java/avro-tools-${avroVersion}.jar
java -jar downloads/avro-tools-${avroVersion}.jar $*


================================================
FILE: scripts/run-compile-schema.sh
================================================
#!/usr/bin/env bash
set -ex
avroVersion=${1?"Usage: $0 AVRO_VERSION SCHEMA_FILE"};
schemaFile=${2?"Usage: $0 AVRO_VERSION SCHEMA_FILE"};
mkdir -p input/
mkdir -p output/
./run-avro-cli.sh $1 compile schema input/$2 output/


================================================
FILE: settings.gradle
================================================
plugins {
    id "com.gradle.enterprise" version "3.3.4"
}

rootProject.name = "gradle-avro-plugin"

gradleEnterprise {
    buildScan {
        if (System.getenv("CI")) {
            termsOfServiceUrl = "https://gradle.com/terms-of-service"
            termsOfServiceAgree = "yes"
            publishAlways()
            uploadInBackground = false
            tag "CI"
        } else {
            tag "Local"
        }
    }
}


================================================
FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/AvroBasePlugin.java
================================================
/**
 * Copyright © 2014-2019 Commerce Technologies, LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.davidmc24.gradle.plugin.avro;

import org.gradle.api.Plugin;
import org.gradle.api.Project;

public class AvroBasePlugin implements Plugin<Project> {
    @Override
    public void apply(final Project project) {
        configureExtension(project);
    }

    @SuppressWarnings("deprecation")
    private static void configureExtension(final Project project) {
        final AvroExtension avroExtension =
            GradleCompatibility.createExtensionWithObjectFactory(project, Constants.AVRO_EXTENSION_NAME, DefaultAvroExtension.class);
        project.getTasks().withType(GenerateAvroJavaTask.class).configureEach(task -> {
            task.getOutputCharacterEncoding().convention(avroExtension.getOutputCharacterEncoding());
            task.getStringType().convention(avroExtension.getStringType());
            task.getFieldVisibility().convention(avroExtension.getFieldVisibility());
            task.getTemplateDirectory().convention(avroExtension.getTemplateDirectory());
            task.getAdditionalVelocityToolClasses().convention(avroExtension.getAdditionalVelocityToolClasses());
            task.isCreateSetters().convention(avroExtension.isCreateSetters());
            task.isCreateOptionalGetters().convention(avroExtension.isCreateOptionalGetters());
            task.isGettersReturnOptional().convention(avroExtension.isGettersReturnOptional());
            task.isOptionalGettersForNullableFieldsOnly().convention(avroExtension.isOptionalGettersForNullableFieldsOnly());
            task.isEnableDecimalLogicalType().convention(avroExtension.isEnableDecimalLogicalType());
            task.getConversionsAndTypeFactoriesClasspath().from(avroExtension.getConversionsAndTypeFactoriesClasspath());
            task.getLogicalTypeFactories().convention(avroExtension.getLogicalTypeFactories());
            task.getLogicalTypeFactoryClassNames().convention(avroExtension.getLogicalTypeFactoryClassNames());
            task.getCustomConversions().convention(avroExtension.getCustomConversions());
            task.getCustomConversionClassNames().convention(avroExtension.getCustomConversionClassNames());
        });
    }
}


================================================
FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/AvroExtension.java
================================================
/**
 * Copyright © 2013-2019 Commerce Technologies, LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.davidmc24.gradle.plugin.avro;

import org.apache.avro.Conversion;
import org.apache.avro.LogicalTypes;
import org.gradle.api.file.ConfigurableFileCollection;
import org.gradle.api.provider.ListProperty;
import org.gradle.api.provider.MapProperty;
import org.gradle.api.provider.Property;

@SuppressWarnings("unused")
public interface AvroExtension {
    Property<String> getOutputCharacterEncoding();
    Property<String> getStringType();
    Property<String> getFieldVisibility();
    Property<String> getTemplateDirectory();
    ListProperty<String> getAdditionalVelocityToolClasses();
    Property<Boolean> isCreateSetters();
    Property<Boolean> isCreateOptionalGetters();
    Property<Boolean> isGettersReturnOptional();
    Property<Boolean> isOptionalGettersForNullableFieldsOnly();
    Property<Boolean> isEnableDecimalLogicalType();
    ConfigurableFileCollection getConversionsAndTypeFactoriesClasspath();

    /**
     * @deprecated use {@link #getLogicalTypeFactoryClassNames()} instead
     */
    @Deprecated
    MapProperty<String, Class<? extends LogicalTypes.LogicalTypeFactory>> getLogicalTypeFactories();
    MapProperty<String, String> getLogicalTypeFactoryClassNames();

    /**
     * @deprecated use {@link #getCustomConversionClassNames()} instead
     */
    @Deprecated
    ListProperty<Class<? extends Conversion<?>>> getCustomConversions();
    ListProperty<String> getCustomConversionClassNames();

    /**
     * @deprecated use {@link #logicalTypeFactory(String, String)}
     */
    @Deprecated
    AvroExtension logicalTypeFactory(String typeName, Class<? extends LogicalTypes.LogicalTypeFactory> typeFactoryClass);
    AvroExtension logicalTypeFactory(String typeName, String typeFactoryClassName);

    /**
     * @deprecated use {@link #customConversion(String)} instead
     */
    @Deprecated
    AvroExtension customConversion(Class<? extends Conversion<?>> conversionClass);
    AvroExtension customConversion(String conversionClassName);
}


================================================
FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/AvroPlugin.java
================================================
/**
 * Copyright © 2013-2019 Commerce Technologies, LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.davidmc24.gradle.plugin.avro;

import java.io.File;
import java.io.FileFilter;
import java.nio.charset.Charset;
import java.util.Optional;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.file.Directory;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.provider.Provider;
import org.gradle.api.tasks.SourceSet;
import org.gradle.api.tasks.SourceSetContainer;
import org.gradle.api.tasks.SourceTask;
import org.gradle.api.tasks.TaskProvider;
import org.gradle.api.tasks.compile.JavaCompile;
import org.gradle.plugins.ide.idea.GenerateIdeaModule;
import org.gradle.plugins.ide.idea.IdeaPlugin;
import org.gradle.plugins.ide.idea.model.IdeaModule;

import static org.gradle.api.plugins.JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME;

public class AvroPlugin implements Plugin<Project> {
    @Override
    public void apply(final Project project) {
        project.getPlugins().apply(JavaPlugin.class);
        project.getPlugins().apply(AvroBasePlugin.class);
        configureTasks(project);
        configureIntelliJ(project);
    }

    private static void configureTasks(final Project project) {
        getSourceSets(project).configureEach(sourceSet -> {
            TaskProvider<GenerateAvroProtocolTask> protoTaskProvider = configureProtocolGenerationTask(project, sourceSet);
            TaskProvider<GenerateAvroJavaTask> javaTaskProvider = configureJavaGenerationTask(project, sourceSet, protoTaskProvider);
            configureTaskDependencies(project, sourceSet, javaTaskProvider);
        });
    }

    private static void configureIntelliJ(final Project project) {
        project.getPlugins().withType(IdeaPlugin.class).configureEach(ideaPlugin -> {
            SourceSet mainSourceSet = getMainSourceSet(project);
            SourceSet testSourceSet = getTestSourceSet(project);
            IdeaModule module = ideaPlugin.getModel().getModule();
            module.setSourceDirs(new SetBuilder<File>()
                .addAll(module.getSourceDirs())
                .add(getAvroSourceDir(project, mainSourceSet))
                .add(getGeneratedOutputDir(project, mainSourceSet, Constants.JAVA_EXTENSION).map(Directory::getAsFile).get())
                .build());
            GradleCompatibility.addTestSources(module,
                getAvroSourceDir(project, testSourceSet),
                getGeneratedOutputDir(project, testSourceSet, Constants.JAVA_EXTENSION).map(Directory::getAsFile).get()
            );
            // IntelliJ doesn't allow source directories beneath an excluded directory.
            // Thus, we remove the build directory exclude and add all non-generated sub-directories as excludes.
            SetBuilder<File> excludeDirs = new SetBuilder<>();
            excludeDirs.addAll(module.getExcludeDirs()).remove(project.getBuildDir());
            File buildDir = project.getBuildDir();
            if (buildDir.isDirectory()) {
                excludeDirs.addAll(project.getBuildDir().listFiles(new NonGeneratedDirectoryFileFilter()));
            }
            module.setExcludeDirs(excludeDirs.build());
        });
        project.getTasks().withType(GenerateIdeaModule.class).configureEach(generateIdeaModule ->
            generateIdeaModule.doFirst(task ->
                project.getTasks().withType(GenerateAvroJavaTask.class, generateAvroJavaTask ->
                    project.mkdir(generateAvroJavaTask.getOutputDir().get()))));
    }

    private static TaskProvider<GenerateAvroProtocolTask> configureProtocolGenerationTask(final Project project,
                                                                                          final SourceSet sourceSet) {
        String taskName = sourceSet.getTaskName("generate", "avroProtocol");
        return project.getTasks().register(taskName, GenerateAvroProtocolTask.class, task -> {
            task.setDescription(
                String.format("Generates %s Avro protocol definition files from IDL files.", sourceSet.getName()));
            task.setGroup(Constants.GROUP_SOURCE_GENERATION);
            task.source(getAvroSourceDir(project, sourceSet));
            task.include("**/*." + Constants.IDL_EXTENSION);
            task.setClasspath(project.getConfigurations().getByName(RUNTIME_CLASSPATH_CONFIGURATION_NAME));
            task.getOutputDir().convention(getGeneratedOutputDir(project, sourceSet, Constants.PROTOCOL_EXTENSION));
        });
    }

    private static TaskProvider<GenerateAvroJavaTask> configureJavaGenerationTask(final Project project, final SourceSet sourceSet,
                                                                    TaskProvider<GenerateAvroProtocolTask> protoTaskProvider) {
        String taskName = sourceSet.getTaskName("generate", "avroJava");
        TaskProvider<GenerateAvroJavaTask> javaTaskProvider = project.getTasks().register(taskName, GenerateAvroJavaTask.class, task -> {
            task.setDescription(String.format("Generates %s Avro Java source files from schema/protocol definition files.",
                sourceSet.getName()));
            task.setGroup(Constants.GROUP_SOURCE_GENERATION);
            task.source(getAvroSourceDir(project, sourceSet));
            task.source(protoTaskProvider);
            task.include("**/*." + Constants.SCHEMA_EXTENSION, "**/*." + Constants.PROTOCOL_EXTENSION);
            task.getOutputDir().convention(getGeneratedOutputDir(project, sourceSet, Constants.JAVA_EXTENSION));

            sourceSet.getJava().srcDir(task.getOutputDir());

            JavaCompile compileJavaTask = project.getTasks().named(sourceSet.getCompileJavaTaskName(), JavaCompile.class).get();
            task.getOutputCharacterEncoding().convention(project.provider(() ->
                Optional.ofNullable(compileJavaTask.getOptions().getEncoding()).orElse(Charset.defaultCharset().name())));
        });
        project.getTasks().named(sourceSet.getCompileJavaTaskName(), JavaCompile.class, compileJavaTask -> {
            compileJavaTask.source(javaTaskProvider);
        });
        // When the Gradle's JVM plugin's withSourcesJar capability is used, it automatically includes all directories listed in the
        // SourceSet's `allSource`.  However, in Gradle 7.1, they started including a warning that execution optimizations are disabled
        // unless you explicitly declare what task produced the directory you're using.  Gradle doesn't currently have a way to declare a
        // source directory and the task that creates it, so for now we need to manually declare the task dependency.
        project.getTasks()
            .matching(task -> GradleCompatibility.getSourcesJarTaskName(sourceSet).equals(task.getName()))
            .configureEach(sourcesJarTask -> sourcesJarTask.dependsOn(javaTaskProvider));
        return javaTaskProvider;
    }

    private static void configureTaskDependencies(final Project project, final SourceSet sourceSet,
                                                  final TaskProvider<GenerateAvroJavaTask> javaTaskProvider) {
        project.getPluginManager().withPlugin("org.jetbrains.kotlin.jvm", appliedPlugin ->
            project.getTasks()
                .withType(SourceTask.class)
                .matching(task -> sourceSet.getCompileTaskName("kotlin").equals(task.getName()))
                .configureEach(task ->
                    task.source(javaTaskProvider.get().getOutputs())
                )
        );
    }

    private static File getAvroSourceDir(Project project, SourceSet sourceSet) {
        return project.file(String.format("src/%s/avro", sourceSet.getName()));
    }

    private static Provider<Directory> getGeneratedOutputDir(Project project, SourceSet sourceSet, String extension) {
        String generatedOutputDirName = String.format("generated-%s-avro-%s", sourceSet.getName(), extension);
        return project.getLayout().getBuildDirectory().dir(generatedOutputDirName);
    }

    private static SourceSetContainer getSourceSets(Project project) {
        return project.getExtensions().getByType(SourceSetContainer.class);
    }

    private static SourceSet getMainSourceSet(Project project) {
        return getSourceSets(project).getByName(SourceSet.MAIN_SOURCE_SET_NAME);
    }

    private static SourceSet getTestSourceSet(Project project) {
        return getSourceSets(project).getByName(SourceSet.TEST_SOURCE_SET_NAME);
    }

    private static class NonGeneratedDirectoryFileFilter implements FileFilter {
        @Override
        public boolean accept(File file) {
            return file.isDirectory() && !file.getName().startsWith("generated-");
        }
    }
}


================================================
FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/AvroUtils.java
================================================
package com.github.davidmc24.gradle.plugin.avro;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import org.apache.avro.Protocol;
import org.apache.avro.Schema;

/**
 * Utility method for working with Avro objects.
 */
class AvroUtils {
    /**
     * The namespace separator.
     */
    private static final String NAMESPACE_SEPARATOR = ".";

    /**
     * The extension separator.
     */
    private static final String EXTENSION_SEPARATOR = ".";

    /**
     * The Unix separator.
     */
    private static final String UNIX_SEPARATOR = "/";

    /**
     * Not intended for instantiation.
     */
    private AvroUtils() { }

    /**
     * Assembles a file path based on the namespace and name of the provided {@link Schema}.
     *
     * @param schema the schema for which to assemble a path
     * @return a file path
     */
    static String assemblePath(Schema schema) {
        return assemblePath(schema.getNamespace(), schema.getName(), Constants.SCHEMA_EXTENSION);
    }

    /**
     * Assembles a file path based on the namespace and name of the provided {@link Protocol}.
     *
     * @param protocol the protocol for which to assemble a path
     * @return a file path
     */
    static String assemblePath(Protocol protocol) {
        return assemblePath(protocol.getNamespace(), protocol.getName(), Constants.PROTOCOL_EXTENSION);
    }

    /**
     * Assembles a file path based on the provided arguments.
     *
     * @param namespace the namespace for the path; may be null
     * @param name the name for the path; will result in an exception if null or empty
     * @param extension the extension for the path
     * @return the assembled path
     */
    private static String assemblePath(String namespace, String name, String extension) {
        Strings.requireNotEmpty(name, "Path cannot be assembled for nameless objects");
        List<String> parts = new ArrayList<>();
        if (Strings.isNotEmpty(namespace)) {
            parts.add(namespace.replaceAll(Pattern.quote(NAMESPACE_SEPARATOR), UNIX_SEPARATOR));
        }
        parts.add(name + EXTENSION_SEPARATOR + extension);
        return String.join(UNIX_SEPARATOR, parts);
    }
}


================================================
FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/Constants.java
================================================
/**
 * Copyright © 2013-2015 Commerce Technologies, LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.davidmc24.gradle.plugin.avro;

import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.apache.avro.Conversion;
import org.apache.avro.LogicalTypes;
import org.apache.avro.compiler.specific.SpecificCompiler.FieldVisibility;
import org.apache.avro.generic.GenericData.StringType;
import org.gradle.api.reflect.TypeOf;

/**
 * Various constants needed by the plugin.
 *
 * <p>The default values from {@code avro-compiler} aren't exposed in a way that's easily accessible, so even default
 * values that we want to match are still reproduced here.</p>
 */
class Constants {
    static final String UTF8_ENCODING = "UTF-8";

    static final String DEFAULT_STRING_TYPE = StringType.String.name();
    static final String DEFAULT_FIELD_VISIBILITY = FieldVisibility.PRIVATE.name();
    static final boolean DEFAULT_CREATE_SETTERS = true;
    static final boolean DEFAULT_CREATE_OPTIONAL_GETTERS = false;
    static final boolean DEFAULT_GETTERS_RETURN_OPTIONAL = false;
    static final boolean DEFAULT_OPTIONAL_GETTERS_FOR_NULLABLE_FIELDS_ONLY = false;
    static final boolean DEFAULT_ENABLE_DECIMAL_LOGICAL_TYPE = true;
    static final Map<String, Class<? extends LogicalTypes.LogicalTypeFactory>> DEFAULT_LOGICAL_TYPE_FACTORIES = Collections.emptyMap();
    static final Map<String, String> DEFAULT_LOGICAL_TYPE_FACTORY_CLASS_NAMES = Collections.emptyMap();
    static final List<Class<? extends Conversion<?>>> DEFAULT_CUSTOM_CONVERSIONS = Collections.emptyList();
    static final List<String> DEFAULT_CUSTOM_CONVERSION_CLASS_NAMES = Collections.emptyList();

    static final String SCHEMA_EXTENSION = "avsc";
    static final String PROTOCOL_EXTENSION = "avpr";
    static final String IDL_EXTENSION = "avdl";
    static final String JAVA_EXTENSION = "java";

    static final String GROUP_SOURCE_GENERATION = "Source Generation";

    static final String AVRO_EXTENSION_NAME = "avro";

    static final String OPTION_FIELD_VISIBILITY = "fieldVisibility";
    static final String OPTION_STRING_TYPE = "stringType";

    static final TypeOf<Class<? extends LogicalTypes.LogicalTypeFactory>> LOGICAL_TYPE_FACTORY_TYPE =
        new TypeOf<Class<? extends LogicalTypes.LogicalTypeFactory>>() { };

    static final TypeOf<Class<? extends Conversion<?>>> CONVERSION_TYPE =
        new TypeOf<Class<? extends Conversion<?>>>() { };
}


================================================
FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/DefaultAvroExtension.java
================================================
/**
 * Copyright © 2013-2019 Commerce Technologies, LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.davidmc24.gradle.plugin.avro;

import java.nio.charset.Charset;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import javax.inject.Inject;
import org.apache.avro.Conversion;
import org.apache.avro.LogicalTypes;
import org.apache.avro.compiler.specific.SpecificCompiler;
import org.apache.avro.generic.GenericData;
import org.gradle.api.Project;
import org.gradle.api.file.ConfigurableFileCollection;
import org.gradle.api.model.ObjectFactory;
import org.gradle.api.provider.ListProperty;
import org.gradle.api.provider.MapProperty;
import org.gradle.api.provider.Property;
import org.gradle.api.provider.Provider;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Optional;

@SuppressWarnings({"unused", "WeakerAccess"})
public class DefaultAvroExtension implements AvroExtension {
    private final Property<String> outputCharacterEncoding;
    private final Property<String> stringType;
    private final Property<String> fieldVisibility;
    private final Property<String> templateDirectory;
    private final ListProperty<String> additionalVelocityToolClasses;
    private final Property<Boolean> createSetters;
    private final Property<Boolean> createOptionalGetters;
    private final Property<Boolean> gettersReturnOptional;
    private final Property<Boolean> optionalGettersForNullableFieldsOnly;
    private final Property<Boolean> enableDecimalLogicalType;
    private final ConfigurableFileCollection conversionsAndTypeFactoriesClasspath;
    private final MapProperty<String, Class<? extends LogicalTypes.LogicalTypeFactory>> logicalTypeFactories;
    private final MapProperty<String, String> logicalTypeFactoryClassNames;
    private final ListProperty<Class<? extends Conversion<?>>> customConversions;
    private final ListProperty<String> customConversionClassNames;

    @Inject
    public DefaultAvroExtension(Project project, ObjectFactory objects) {
        this.outputCharacterEncoding = objects.property(String.class);
        this.stringType = objects.property(String.class).convention(Constants.DEFAULT_STRING_TYPE);
        this.fieldVisibility = objects.property(String.class).convention(Constants.DEFAULT_FIELD_VISIBILITY);
        this.templateDirectory = objects.property(String.class);
        this.additionalVelocityToolClasses =
                objects.listProperty(String.class).convention(Collections.emptyList());
        this.createSetters = objects.property(Boolean.class).convention(Constants.DEFAULT_CREATE_SETTERS);
        this.createOptionalGetters = objects.property(Boolean.class).convention(Constants.DEFAULT_CREATE_OPTIONAL_GETTERS);
        this.gettersReturnOptional = objects.property(Boolean.class).convention(Constants.DEFAULT_GETTERS_RETURN_OPTIONAL);
        this.optionalGettersForNullableFieldsOnly = objects.property(Boolean.class)
            .convention(Constants.DEFAULT_OPTIONAL_GETTERS_FOR_NULLABLE_FIELDS_ONLY);
        this.enableDecimalLogicalType = objects.property(Boolean.class).convention(Constants.DEFAULT_ENABLE_DECIMAL_LOGICAL_TYPE);
        this.conversionsAndTypeFactoriesClasspath = GradleCompatibility.createConfigurableFileCollection(project);
        this.logicalTypeFactories = objects.mapProperty(String.class, Constants.LOGICAL_TYPE_FACTORY_TYPE.getConcreteClass())
            .convention(Constants.DEFAULT_LOGICAL_TYPE_FACTORIES);
        this.logicalTypeFactoryClassNames = objects.mapProperty(String.class, String.class)
            .convention(Constants.DEFAULT_LOGICAL_TYPE_FACTORY_CLASS_NAMES);
        this.customConversions =
            objects.listProperty(Constants.CONVERSION_TYPE.getConcreteClass()).convention(Constants.DEFAULT_CUSTOM_CONVERSIONS);
        this.customConversionClassNames =
            objects.listProperty(String.class).convention(Constants.DEFAULT_CUSTOM_CONVERSION_CLASS_NAMES);
    }

    @Override
    public Property<String> getOutputCharacterEncoding() {
        return outputCharacterEncoding;
    }

    public void setOutputCharacterEncoding(String outputCharacterEncoding) {
        this.outputCharacterEncoding.set(outputCharacterEncoding);
    }

    public void setOutputCharacterEncoding(Charset outputCharacterEncoding) {
        setOutputCharacterEncoding(outputCharacterEncoding.name());
    }

    @Override
    public Property<String> getStringType() {
        return stringType;
    }

    public void setStringType(String stringType) {
        this.stringType.set(stringType);
    }

    public void setStringType(GenericData.StringType stringType) {
        setStringType(stringType.name());
    }

    @Override
    public Property<String> getFieldVisibility() {
        return fieldVisibility;
    }

    public void setFieldVisibility(String fieldVisibility) {
        this.fieldVisibility.set(fieldVisibility);
    }

    public void setFieldVisibility(SpecificCompiler.FieldVisibility fieldVisibility) {
        setFieldVisibility(fieldVisibility.name());
    }

    @Override
    public Property<String> getTemplateDirectory() {
        return templateDirectory;
    }

    public void setTemplateDirectory(String templateDirectory) {
        this.templateDirectory.set(templateDirectory);
    }

    @Optional
    @Input
    public ListProperty<String> getAdditionalVelocityToolClasses() {
        return additionalVelocityToolClasses;
    }

    public void setAdditionalVelocityToolClasses(List<String> additionalVelocityToolClasses) {
        this.additionalVelocityToolClasses.set(additionalVelocityToolClasses);
    }

    @Override
    public Property<Boolean> isCreateSetters() {
        return createSetters;
    }

    public void setCreateSetters(String createSetters) {
        setCreateSetters(Boolean.parseBoolean(createSetters));
    }

    public void setCreateSetters(boolean createSetters) {
        this.createSetters.set(createSetters);
    }

    @Override
    public Property<Boolean> isCreateOptionalGetters() {
        return createOptionalGetters;
    }

    public void setCreateOptionalGetters(String createOptionalGetters) {
        setCreateOptionalGetters(Boolean.parseBoolean(createOptionalGetters));
    }

    public void setCreateOptionalGetters(boolean createOptionalGetters) {
        this.createOptionalGetters.set(createOptionalGetters);
    }

    @Override
    public Property<Boolean> isGettersReturnOptional() {
        return gettersReturnOptional;
    }

    public void setGettersReturnOptional(String gettersReturnOptional) {
        setGettersReturnOptional(Boolean.parseBoolean(gettersReturnOptional));
    }

    public void setGettersReturnOptional(boolean gettersReturnOptional) {
        this.gettersReturnOptional.set(gettersReturnOptional);
    }

    @Override
    public Property<Boolean> isOptionalGettersForNullableFieldsOnly() {
        return optionalGettersForNullableFieldsOnly;
    }

    public void setOptionalGettersForNullableFieldsOnly(String optionalGettersForNullableFieldsOnly) {
        setOptionalGettersForNullableFieldsOnly(Boolean.parseBoolean(optionalGettersForNullableFieldsOnly));
    }

    public void setOptionalGettersForNullableFieldsOnly(boolean optionalGettersForNullableFieldsOnly) {
        this.optionalGettersForNullableFieldsOnly.set(optionalGettersForNullableFieldsOnly);
    }

    @Override
    public Property<Boolean> isEnableDecimalLogicalType() {
        return enableDecimalLogicalType;
    }

    public void setEnableDecimalLogicalType(String enableDecimalLogicalType) {
        setEnableDecimalLogicalType(Boolean.parseBoolean(enableDecimalLogicalType));
    }

    public void setEnableDecimalLogicalType(boolean enableDecimalLogicalType) {
        this.enableDecimalLogicalType.set(enableDecimalLogicalType);
    }

    @Override
    public ConfigurableFileCollection getConversionsAndTypeFactoriesClasspath() {
        return conversionsAndTypeFactoriesClasspath;
    }

    /**
     * @deprecated use {@link #getLogicalTypeFactoryClassNames()} instead
     */
    @Deprecated
    @Override
    public MapProperty<String, Class<? extends LogicalTypes.LogicalTypeFactory>> getLogicalTypeFactories() {
        return logicalTypeFactories;
    }

    /**
     * @deprecated use {@link #setLogicalTypeFactoryClassNames(Provider)} ()} instead
     */
    @Deprecated
    public void setLogicalTypeFactories(Provider<? extends Map<? extends String,
        ? extends Class<? extends LogicalTypes.LogicalTypeFactory>>> provider) {
        this.logicalTypeFactories.set(provider);
    }

    /**
     * @deprecated use {@link #setLogicalTypeFactoryClassNames(Map)} ()} instead
     */
    @Deprecated
    public void setLogicalTypeFactories(Map<? extends String,
        ? extends Class<? extends LogicalTypes.LogicalTypeFactory>> logicalTypeFactories) {
        this.logicalTypeFactories.set(logicalTypeFactories);
    }

    @Override
    public MapProperty<String, String> getLogicalTypeFactoryClassNames() {
        return logicalTypeFactoryClassNames;
    }

    public void setLogicalTypeFactoryClassNames(Provider<? extends Map<? extends String,
        ? extends String>> provider) {
        this.logicalTypeFactoryClassNames.set(provider);
    }

    public void setLogicalTypeFactoryClassNames(Map<? extends String,
        ? extends String> logicalTypeFactoryClassNames) {
        this.logicalTypeFactoryClassNames.set(logicalTypeFactoryClassNames);
    }

    /**
     * @deprecated use {@link #getCustomConversionClassNames()} instead
     */
    @Deprecated
    @Override
    public ListProperty<Class<? extends Conversion<?>>> getCustomConversions() {
        return customConversions;
    }

    /**
     * @deprecated use {@link #setCustomConversionClassNames(Provider)} ()} instead
     */
    @Deprecated
    public void setCustomConversions(Provider<Iterable<Class<? extends Conversion<?>>>> provider) {
        this.customConversions.set(provider);
    }

    /**
     * @deprecated use {@link #setCustomConversionClassNames(Iterable)} instead
     */
    @Deprecated
    public void setCustomConversions(Iterable<Class<? extends Conversion<?>>> customConversions) {
        this.customConversions.set(customConversions);
    }

    public ListProperty<String> getCustomConversionClassNames() {
        return customConversionClassNames;
    }

    public void setCustomConversionClassNames(Provider<Iterable<String>> provider) {
        this.customConversionClassNames.set(provider);
    }

    public void setCustomConversionClassNames(Iterable<String> customConversionClassNames) {
        this.customConversionClassNames.set(customConversionClassNames);
    }

    /**
     * @deprecated use {@link #logicalTypeFactory(String, String)} ()} instead
     */
    @Deprecated
    @Override
    public AvroExtension logicalTypeFactory(String typeName, Class<? extends LogicalTypes.LogicalTypeFactory> typeFactoryClass) {
        logicalTypeFactories.put(typeName, typeFactoryClass);
        return this;
    }

    @Override
    public AvroExtension logicalTypeFactory(String typeName, String typeFactoryClassName) {
        logicalTypeFactoryClassNames.put(typeName, typeFactoryClassName);
        return this;
    }

    /**
     * @deprecated use {@link #customConversion(String)} ()} instead
     */
    @Deprecated
    @Override
    public AvroExtension customConversion(Class<? extends Conversion<?>> conversionClass) {
        customConversions.add(conversionClass);
        return this;
    }

    @Override
    public AvroExtension customConversion(String conversionClassName) {
        customConversionClassNames.add(conversionClassName);
        return this;
    }
}


================================================
FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/Enums.java
================================================
/**
 * Copyright © 2015 Commerce Technologies, LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.davidmc24.gradle.plugin.avro;

import java.util.Arrays;

class Enums {
    static <T extends Enum<T>> T parseCaseInsensitive(String label, T[] values, String input) {
        for (T value : values) {
            if (value.name().equalsIgnoreCase(input)) {
                return value;
            }
        }
        throw new IllegalArgumentException(String.format("Invalid %s '%s'.  Value values are: %s",
                label, input, Arrays.asList(values)));
    }
}


================================================
FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/FileExtensionSpec.java
================================================
/**
 * Copyright © 2013-2015 Commerce Technologies, LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.davidmc24.gradle.plugin.avro;

import java.io.File;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.gradle.api.specs.Spec;

class FileExtensionSpec implements Spec<File> {
    private final Set<String> extensions;

    FileExtensionSpec(String... extensions) {
        this.extensions = new HashSet<>(Arrays.asList(extensions));
    }

    FileExtensionSpec(Collection<String> extensions) {
        this.extensions = new HashSet<>(extensions);
    }

    @Override
    public boolean isSatisfiedBy(File file) {
        return extensions.contains(FilenameUtils.getExtension(file.getName()));
    }
}


================================================
FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/FileState.java
================================================
/**
 * Copyright © 2015 Commerce Technologies, LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.davidmc24.gradle.plugin.avro;

import java.io.File;
import java.util.Set;
import java.util.TreeSet;

class FileState implements Comparable<FileState> {
    private final File file;
    private final String path;
    private String errorMessage;
    private Set<String> duplicateTypeNames = new TreeSet<>();

    FileState(File file, String path) {
        this.file = file;
        this.path = path;
    }

    File getFile() {
        return file;
    }

    Set<String> getDuplicateTypeNames() {
        return duplicateTypeNames;
    }

    void clearError() {
        errorMessage = null;
    }

    void setError(Throwable ex) {
        this.errorMessage = ex.getMessage();
    }

    void addDuplicateTypeName(String typeName) {
        duplicateTypeNames.add(typeName);
    }

    public boolean containsDuplicateTypeName(String typeName) {
        return duplicateTypeNames.contains(typeName);
    }

    public String getPath() {
        return path;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    @Override
    public int compareTo(FileState o) {
        return path.compareTo(o.getPath());
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FileState fileState = (FileState) o;
        return path.equals(fileState.path);
    }

    @Override
    public int hashCode() {
        return path.hashCode();
    }
}


================================================
FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/FileUtils.java
================================================
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.davidmc24.gradle.plugin.avro;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Path;
import org.gradle.api.file.ProjectLayout;

/**
 * General file manipulation utilities.
 *
 * <p>This copy from Apache Commons IO has been pruned down to just what is needed for gradle-avro-plugin.</p>
 *
 * <p>
 * Facilities are provided in the following areas:
 * <ul>
 * <li>writing to a file
 * <li>reading from a file
 * <li>make a directory including parent directories
 * <li>copying files and directories
 * <li>deleting files and directories
 * <li>converting to and from a URL
 * <li>listing files and directories by filter and extension
 * <li>comparing file content
 * <li>file last changed date
 * <li>calculating a checksum
 * </ul>
 * <p>
 * Origin of code: Excalibur, Alexandria, Commons-Utils
 *
 * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</A>
 * @author <a href="mailto:sanders@apache.org">Scott Sanders</a>
 * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
 * @author <a href="mailto:Christoph.Reck@dlr.de">Christoph.Reck</a>
 * @author <a href="mailto:peter@apache.org">Peter Donald</a>
 * @author <a href="mailto:jefft@apache.org">Jeff Turner</a>
 * @author Matthew Hawthorne
 * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
 * @author Stephen Colebourne
 * @author Ian Springer
 * @author Chris Eldredge
 * @author Jim Harrington
 * @author Niall Pemberton
 * @author Sandy McArthur
 * @version $Id: FileUtils.java 507684 2007-02-14 20:38:25Z bayard $
 */
class FileUtils {
    /**
     * Opens a {@link FileOutputStream} for the specified file, checking and
     * creating the parent directory if it does not exist.
     * <p>
     * At the end of the method either the stream will be successfully opened,
     * or an exception will have been thrown.
     * <p>
     * The parent directory will be created if it does not exist.
     * The file will be created if it does not exist.
     * An exception is thrown if the file object exists but is a directory.
     * An exception is thrown if the file exists but cannot be written to.
     * An exception is thrown if the parent directory cannot be created.
     *
     * @param file  the file to open for output, must not be <code>null</code>
     * @return a new {@link FileOutputStream} for the specified file
     * @throws IOException if the file object is a directory
     * @throws IOException if the file cannot be written to
     * @throws IOException if a parent directory needs creating but that fails
     * @since Commons IO 1.3
     */
    private static FileOutputStream openOutputStream(File file) throws IOException {
        if (file.exists()) {
            if (file.isDirectory()) {
                throw new IOException("File '" + file + "' exists but is a directory");
            }
            if (!file.canWrite()) {
                throw new IOException("File '" + file + "' cannot be written to");
            }
        } else {
            File parent = file.getParentFile();
            if (parent != null && !parent.exists()) {
                if (!parent.mkdirs()) {
                    throw new IOException("File '" + file + "' could not be created");
                }
            }
        }
        return new FileOutputStream(file);
    }

    /**
     * Writes a String to a file creating the file if it does not exist.
     *
     * NOTE: As from v1.3, the parent directories of the file will be created
     * if they do not exist.
     *
     * @param file  the file to write
     * @param data  the content to write to the file
     * @param encoding  the encoding to use, <code>null</code> means platform default
     * @throws IOException in case of an I/O error
     * @throws java.io.UnsupportedEncodingException if the encoding is not supported by the VM
     */
    @SuppressWarnings("SameParameterValue")
    private static void writeStringToFile(File file, String data, String encoding) throws IOException {
        if (encoding == null) {
            throw new IllegalArgumentException("Must specify encoding");
        }
        try (OutputStream out = openOutputStream(file)) {
            if (data != null) {
                out.write(data.getBytes(encoding));
            }
        }
    }

    /**
     * Writes a file in a manner appropriate for a JSON file.  UTF-8 will be used, as it is the default encoding for JSON, and should be
     * maximally interoperable.
     *
     * @see <a href="https://tools.ietf.org/html/rfc7159#section-8.1">JSON Character Encoding</a>
     */
    static void writeJsonFile(File file, String data) throws IOException {
        writeStringToFile(file, data, Constants.UTF8_ENCODING);
    }

    /**
     * Acts as a replacement for {@link org.gradle.api.Project#relativePath(Object)}, as Configuration Cache support doesn't allow
     * maintaining references to the {@link org.gradle.api.Project}.
     */
    static String projectRelativePath(ProjectLayout projectLayout, File file) {
        Path path = file.toPath();
        if (path.isAbsolute()) {
            Path projectDirectoryPath = projectLayout.getProjectDirectory().getAsFile().toPath();
            path = proj
Download .txt
gitextract_acedqttq/

├── .editorconfig
├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── config.yml
│   └── workflows/
│       ├── avro-compatibility.yml
│       ├── ci.yml
│       ├── gradle-compatibility.yml
│       ├── gradle-wrapper-validation.yml
│       ├── java-compatibility.yml
│       ├── os-compatibility.yml
│       └── publish.yml
├── .gitignore
├── CHANGES.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── RELEASING.md
├── build.gradle
├── config/
│   ├── checkstyle/
│   │   ├── checkstyle.xml
│   │   └── import-control.xml
│   └── codenarc/
│       └── codenarc.groovy
├── design-docs/
│   ├── configurations-for-additional-schema.md
│   ├── external-schemata-and-protocols.md
│   └── run-avro-as-an-external-process.md
├── examples/
│   ├── avsc-from-external-jar/
│   │   ├── README.md
│   │   ├── build.gradle
│   │   ├── external-files/
│   │   │   ├── Breed.avsc
│   │   │   └── Cat.avsc
│   │   ├── gradle/
│   │   │   └── wrapper/
│   │   │       └── gradle-wrapper.properties
│   │   ├── gradlew
│   │   ├── gradlew.bat
│   │   ├── settings.gradle
│   │   └── src/
│   │       └── main/
│   │           └── avro/
│   │               └── Cat.avsc
│   ├── avsc-from-subproject/
│   │   ├── README.md
│   │   ├── cat/
│   │   │   ├── build.gradle
│   │   │   └── src/
│   │   │       └── main/
│   │   │           └── avro/
│   │   │               └── Cat.avsc
│   │   ├── gradle/
│   │   │   └── wrapper/
│   │   │       └── gradle-wrapper.properties
│   │   ├── gradlew
│   │   ├── gradlew.bat
│   │   ├── schema/
│   │   │   ├── build.gradle
│   │   │   └── src/
│   │   │       └── main/
│   │   │           └── avro/
│   │   │               └── Breed.avsc
│   │   └── settings.gradle
│   └── default-custom-types/
│       ├── README.md
│       ├── build.gradle
│       ├── buildSrc/
│       │   ├── build.gradle
│       │   └── src/
│       │       └── main/
│       │           └── java/
│       │               └── custom/
│       │                   ├── AvroConventionPlugin.java
│       │                   ├── TimeZoneConversion.java
│       │                   ├── TimeZoneLogicalType.java
│       │                   └── TimeZoneLogicalTypeFactory.java
│       ├── gradle/
│       │   └── wrapper/
│       │       └── gradle-wrapper.properties
│       ├── gradlew
│       ├── gradlew.bat
│       ├── settings.gradle
│       └── src/
│           └── main/
│               ├── avro/
│               │   └── customConversion.avsc
│               └── java/
│                   └── custom/
│                       ├── TimeZoneConversion.java
│                       ├── TimeZoneLogicalType.java
│                       └── TimeZoneLogicalTypeFactory.java
├── gradle/
│   └── wrapper/
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── scripts/
│   ├── run-avro-cli.sh
│   └── run-compile-schema.sh
├── settings.gradle
├── src/
│   ├── main/
│   │   └── java/
│   │       └── com/
│   │           └── github/
│   │               └── davidmc24/
│   │                   └── gradle/
│   │                       └── plugin/
│   │                           └── avro/
│   │                               ├── AvroBasePlugin.java
│   │                               ├── AvroExtension.java
│   │                               ├── AvroPlugin.java
│   │                               ├── AvroUtils.java
│   │                               ├── Constants.java
│   │                               ├── DefaultAvroExtension.java
│   │                               ├── Enums.java
│   │                               ├── FileExtensionSpec.java
│   │                               ├── FileState.java
│   │                               ├── FileUtils.java
│   │                               ├── FilenameUtils.java
│   │                               ├── GenerateAvroJavaTask.java
│   │                               ├── GenerateAvroProtocolTask.java
│   │                               ├── GenerateAvroSchemaTask.java
│   │                               ├── GradleCompatibility.java
│   │                               ├── GradleFeatures.java
│   │                               ├── GradleVersions.java
│   │                               ├── MapUtils.java
│   │                               ├── OutputDirTask.java
│   │                               ├── ProcessingState.java
│   │                               ├── ResolveAvroDependenciesTask.java
│   │                               ├── SchemaResolver.java
│   │                               ├── SetBuilder.java
│   │                               ├── Strings.java
│   │                               └── TypeState.java
│   └── test/
│       ├── groovy/
│       │   └── com/
│       │       └── github/
│       │           └── davidmc24/
│       │               └── gradle/
│       │                   └── plugin/
│       │                       └── avro/
│       │                           ├── AvroBasePluginFunctionalSpec.groovy
│       │                           ├── AvroPluginFunctionalSpec.groovy
│       │                           ├── AvroPluginSpec.groovy
│       │                           ├── AvroUtilsSpec.groovy
│       │                           ├── BuildCacheSupportFunctionalSpec.groovy
│       │                           ├── CustomConversionFunctionalSpec.groovy
│       │                           ├── DuplicateHandlingFunctionalSpec.groovy
│       │                           ├── EncodingFunctionalSpec.groovy
│       │                           ├── EnumHandlingFunctionalSpec.groovy
│       │                           ├── ExamplesFunctionalSpec.groovy
│       │                           ├── FunctionalSpec.groovy
│       │                           ├── GenerateAvroProtocolTaskFunctionalSpec.groovy
│       │                           ├── IntellijFunctionalSpec.groovy
│       │                           ├── KotlinDSLCompatibilityFunctionalSpec.groovy
│       │                           ├── OptionsFunctionalSpec.groovy
│       │                           ├── ResolveAvroDependenciesTaskFunctionalSpec.groovy
│       │                           ├── SchemaResolverSpec.groovy
│       │                           └── StringsSpec.groovy
│       ├── java/
│       │   └── com/
│       │       └── github/
│       │           └── davidmc24/
│       │               └── gradle/
│       │                   └── plugin/
│       │                       └── avro/
│       │                           └── test/
│       │                               └── custom/
│       │                                   ├── CommentGenerator.java
│       │                                   ├── TimeZoneConversion.java
│       │                                   ├── TimeZoneLogicalType.java
│       │                                   ├── TimeZoneLogicalTypeFactory.java
│       │                                   └── TimestampGenerator.java
│       └── resources/
│           ├── com/
│           │   └── github/
│           │       └── davidmc24/
│           │           └── gradle/
│           │               └── plugin/
│           │                   └── avro/
│           │                       ├── Message.avsc
│           │                       ├── customConversion.avpr
│           │                       ├── customConversion.avsc
│           │                       ├── dependent.avdl
│           │                       ├── duplicate/
│           │                       │   ├── Cat.avsc
│           │                       │   ├── ContainsFixed1.avsc
│           │                       │   ├── ContainsFixed2.avsc
│           │                       │   ├── ContainsFixed3.avsc
│           │                       │   ├── Dog.avsc
│           │                       │   ├── Fish.avsc
│           │                       │   ├── Person.avsc
│           │                       │   ├── Spider.avsc
│           │                       │   └── duplicateInSingleFile.avsc
│           │                       ├── enumField.avsc
│           │                       ├── enumMalformed.avsc
│           │                       ├── enumSimple.avsc
│           │                       ├── enumUnion.avsc
│           │                       ├── enumUseSimple.avsc
│           │                       ├── helloWorld.kt
│           │                       ├── idioma.avsc
│           │                       ├── interop-1.9.avdl
│           │                       ├── interop.avdl
│           │                       ├── mail.avpr
│           │                       ├── namespaced-idl/
│           │                       │   ├── v1/
│           │                       │   │   ├── test.avdl
│           │                       │   │   └── test_same_protocol.avdl
│           │                       │   └── v2/
│           │                       │       └── test.avdl
│           │                       ├── record-tools.vm
│           │                       ├── record.vm
│           │                       ├── shared.avdl
│           │                       └── user.avsc
│           ├── examples/
│           │   ├── inline/
│           │   │   └── Cat.avsc
│           │   └── separate/
│           │       ├── Breed.avsc
│           │       └── Cat.avsc
│           └── resolver/
│               ├── SimpleEnum.avsc
│               ├── SimpleFixed.avsc
│               ├── SimpleRecord.avsc
│               ├── UseArray.avsc
│               ├── UseArrayWithType.avsc
│               ├── UseEnum.avsc
│               ├── UseEnumWithType.avsc
│               ├── UseFixed.avsc
│               ├── UseFixedWithType.avsc
│               ├── UseMap.avsc
│               ├── UseMapWithType.avsc
│               ├── UseRecord.avsc
│               └── UseRecordWithType.avsc
├── test-project/
│   ├── build.gradle
│   ├── gradle/
│   │   └── wrapper/
│   │       └── gradle-wrapper.properties
│   ├── gradlew
│   ├── gradlew.bat
│   ├── settings.gradle
│   └── src/
│       ├── main/
│       │   ├── avro/
│       │   │   ├── BuggyRecord.avsc
│       │   │   ├── BuggyRecordWorkaround.avsc
│       │   │   ├── Messages.avsc
│       │   │   └── UUIDTestRecord.avsc
│       │   └── java/
│       │       └── project/
│       │           └── SystemUtil.java
│       └── test/
│           └── java/
│               └── project/
│                   ├── CLIComparisonTest.java
│                   ├── CLIUtil.java
│                   ├── RandomRecordTest.java
│                   └── RecordTest.java
└── test-project-kotlin/
    ├── build.gradle.kts
    ├── gradle/
    │   └── wrapper/
    │       └── gradle-wrapper.properties
    ├── gradlew
    ├── gradlew.bat
    ├── settings.gradle.kts
    └── src/
        ├── main/
        │   ├── avro/
        │   │   ├── BuggyRecord.avsc
        │   │   ├── BuggyRecordWorkaround.avsc
        │   │   ├── Messages.avsc
        │   │   └── UUIDTestRecord.avsc
        │   └── java/
        │       └── project/
        │           └── SystemUtil.java
        └── test/
            └── java/
                └── project/
                    ├── CLIComparisonTest.java
                    ├── CLIUtil.java
                    ├── RandomRecordTest.java
                    └── RecordTest.java
Download .txt
SYMBOL INDEX (333 symbols across 47 files)

FILE: examples/default-custom-types/buildSrc/src/main/java/custom/AvroConventionPlugin.java
  class AvroConventionPlugin (line 8) | public class AvroConventionPlugin implements Plugin<Project> {
    method apply (line 9) | public void apply(Project project) {

FILE: examples/default-custom-types/buildSrc/src/main/java/custom/TimeZoneConversion.java
  class TimeZoneConversion (line 8) | @SuppressWarnings("unused")
    method getConvertedType (line 12) | @Override
    method getLogicalTypeName (line 17) | @Override
    method fromCharSequence (line 22) | @Override
    method toCharSequence (line 27) | @Override
    method getRecommendedSchema (line 32) | @Override

FILE: examples/default-custom-types/buildSrc/src/main/java/custom/TimeZoneLogicalType.java
  class TimeZoneLogicalType (line 6) | public class TimeZoneLogicalType extends LogicalType {
    method TimeZoneLogicalType (line 9) | private TimeZoneLogicalType() {
    method validate (line 13) | @Override

FILE: examples/default-custom-types/buildSrc/src/main/java/custom/TimeZoneLogicalTypeFactory.java
  class TimeZoneLogicalTypeFactory (line 7) | public class TimeZoneLogicalTypeFactory implements LogicalTypes.LogicalT...
    method fromSchema (line 8) | @Override

FILE: examples/default-custom-types/src/main/java/custom/TimeZoneConversion.java
  class TimeZoneConversion (line 8) | @SuppressWarnings("unused")
    method getConvertedType (line 12) | @Override
    method getLogicalTypeName (line 17) | @Override
    method fromCharSequence (line 22) | @Override
    method toCharSequence (line 27) | @Override
    method getRecommendedSchema (line 32) | @Override

FILE: examples/default-custom-types/src/main/java/custom/TimeZoneLogicalType.java
  class TimeZoneLogicalType (line 6) | public class TimeZoneLogicalType extends LogicalType {
    method TimeZoneLogicalType (line 9) | private TimeZoneLogicalType() {
    method validate (line 13) | @Override

FILE: examples/default-custom-types/src/main/java/custom/TimeZoneLogicalTypeFactory.java
  class TimeZoneLogicalTypeFactory (line 7) | public class TimeZoneLogicalTypeFactory implements LogicalTypes.LogicalT...
    method fromSchema (line 8) | @Override

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/AvroBasePlugin.java
  class AvroBasePlugin (line 21) | public class AvroBasePlugin implements Plugin<Project> {
    method apply (line 22) | @Override
    method configureExtension (line 27) | @SuppressWarnings("deprecation")

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/AvroExtension.java
  type AvroExtension (line 25) | @SuppressWarnings("unused")
    method getOutputCharacterEncoding (line 27) | Property<String> getOutputCharacterEncoding();
    method getStringType (line 28) | Property<String> getStringType();
    method getFieldVisibility (line 29) | Property<String> getFieldVisibility();
    method getTemplateDirectory (line 30) | Property<String> getTemplateDirectory();
    method getAdditionalVelocityToolClasses (line 31) | ListProperty<String> getAdditionalVelocityToolClasses();
    method isCreateSetters (line 32) | Property<Boolean> isCreateSetters();
    method isCreateOptionalGetters (line 33) | Property<Boolean> isCreateOptionalGetters();
    method isGettersReturnOptional (line 34) | Property<Boolean> isGettersReturnOptional();
    method isOptionalGettersForNullableFieldsOnly (line 35) | Property<Boolean> isOptionalGettersForNullableFieldsOnly();
    method isEnableDecimalLogicalType (line 36) | Property<Boolean> isEnableDecimalLogicalType();
    method getConversionsAndTypeFactoriesClasspath (line 37) | ConfigurableFileCollection getConversionsAndTypeFactoriesClasspath();
    method getLogicalTypeFactories (line 42) | @Deprecated
    method getLogicalTypeFactoryClassNames (line 44) | MapProperty<String, String> getLogicalTypeFactoryClassNames();
    method getCustomConversions (line 49) | @Deprecated
    method getCustomConversionClassNames (line 51) | ListProperty<String> getCustomConversionClassNames();
    method logicalTypeFactory (line 56) | @Deprecated
    method logicalTypeFactory (line 58) | AvroExtension logicalTypeFactory(String typeName, String typeFactoryCl...
    method customConversion (line 63) | @Deprecated
    method customConversion (line 65) | AvroExtension customConversion(String conversionClassName);

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/AvroPlugin.java
  class AvroPlugin (line 38) | public class AvroPlugin implements Plugin<Project> {
    method apply (line 39) | @Override
    method configureTasks (line 47) | private static void configureTasks(final Project project) {
    method configureIntelliJ (line 55) | private static void configureIntelliJ(final Project project) {
    method configureProtocolGenerationTask (line 85) | private static TaskProvider<GenerateAvroProtocolTask> configureProtoco...
    method configureJavaGenerationTask (line 99) | private static TaskProvider<GenerateAvroJavaTask> configureJavaGenerat...
    method configureTaskDependencies (line 130) | private static void configureTaskDependencies(final Project project, f...
    method getAvroSourceDir (line 142) | private static File getAvroSourceDir(Project project, SourceSet source...
    method getGeneratedOutputDir (line 146) | private static Provider<Directory> getGeneratedOutputDir(Project proje...
    method getSourceSets (line 151) | private static SourceSetContainer getSourceSets(Project project) {
    method getMainSourceSet (line 155) | private static SourceSet getMainSourceSet(Project project) {
    method getTestSourceSet (line 159) | private static SourceSet getTestSourceSet(Project project) {
    class NonGeneratedDirectoryFileFilter (line 163) | private static class NonGeneratedDirectoryFileFilter implements FileFi...
      method accept (line 164) | @Override

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/AvroUtils.java
  class AvroUtils (line 12) | class AvroUtils {
    method AvroUtils (line 31) | private AvroUtils() { }
    method assemblePath (line 39) | static String assemblePath(Schema schema) {
    method assemblePath (line 49) | static String assemblePath(Protocol protocol) {
    method assemblePath (line 61) | private static String assemblePath(String namespace, String name, Stri...

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/Constants.java
  class Constants (line 33) | class Constants {

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/DefaultAvroExtension.java
  class DefaultAvroExtension (line 37) | @SuppressWarnings({"unused", "WeakerAccess"})
    method DefaultAvroExtension (line 55) | @Inject
    method getOutputCharacterEncoding (line 80) | @Override
    method setOutputCharacterEncoding (line 85) | public void setOutputCharacterEncoding(String outputCharacterEncoding) {
    method setOutputCharacterEncoding (line 89) | public void setOutputCharacterEncoding(Charset outputCharacterEncoding) {
    method getStringType (line 93) | @Override
    method setStringType (line 98) | public void setStringType(String stringType) {
    method setStringType (line 102) | public void setStringType(GenericData.StringType stringType) {
    method getFieldVisibility (line 106) | @Override
    method setFieldVisibility (line 111) | public void setFieldVisibility(String fieldVisibility) {
    method setFieldVisibility (line 115) | public void setFieldVisibility(SpecificCompiler.FieldVisibility fieldV...
    method getTemplateDirectory (line 119) | @Override
    method setTemplateDirectory (line 124) | public void setTemplateDirectory(String templateDirectory) {
    method getAdditionalVelocityToolClasses (line 128) | @Optional
    method setAdditionalVelocityToolClasses (line 134) | public void setAdditionalVelocityToolClasses(List<String> additionalVe...
    method isCreateSetters (line 138) | @Override
    method setCreateSetters (line 143) | public void setCreateSetters(String createSetters) {
    method setCreateSetters (line 147) | public void setCreateSetters(boolean createSetters) {
    method isCreateOptionalGetters (line 151) | @Override
    method setCreateOptionalGetters (line 156) | public void setCreateOptionalGetters(String createOptionalGetters) {
    method setCreateOptionalGetters (line 160) | public void setCreateOptionalGetters(boolean createOptionalGetters) {
    method isGettersReturnOptional (line 164) | @Override
    method setGettersReturnOptional (line 169) | public void setGettersReturnOptional(String gettersReturnOptional) {
    method setGettersReturnOptional (line 173) | public void setGettersReturnOptional(boolean gettersReturnOptional) {
    method isOptionalGettersForNullableFieldsOnly (line 177) | @Override
    method setOptionalGettersForNullableFieldsOnly (line 182) | public void setOptionalGettersForNullableFieldsOnly(String optionalGet...
    method setOptionalGettersForNullableFieldsOnly (line 186) | public void setOptionalGettersForNullableFieldsOnly(boolean optionalGe...
    method isEnableDecimalLogicalType (line 190) | @Override
    method setEnableDecimalLogicalType (line 195) | public void setEnableDecimalLogicalType(String enableDecimalLogicalTyp...
    method setEnableDecimalLogicalType (line 199) | public void setEnableDecimalLogicalType(boolean enableDecimalLogicalTy...
    method getConversionsAndTypeFactoriesClasspath (line 203) | @Override
    method getLogicalTypeFactories (line 211) | @Deprecated
    method setLogicalTypeFactories (line 220) | @Deprecated
    method setLogicalTypeFactories (line 229) | @Deprecated
    method getLogicalTypeFactoryClassNames (line 235) | @Override
    method setLogicalTypeFactoryClassNames (line 240) | public void setLogicalTypeFactoryClassNames(Provider<? extends Map<? e...
    method setLogicalTypeFactoryClassNames (line 245) | public void setLogicalTypeFactoryClassNames(Map<? extends String,
    method getCustomConversions (line 253) | @Deprecated
    method setCustomConversions (line 262) | @Deprecated
    method setCustomConversions (line 270) | @Deprecated
    method getCustomConversionClassNames (line 275) | public ListProperty<String> getCustomConversionClassNames() {
    method setCustomConversionClassNames (line 279) | public void setCustomConversionClassNames(Provider<Iterable<String>> p...
    method setCustomConversionClassNames (line 283) | public void setCustomConversionClassNames(Iterable<String> customConve...
    method logicalTypeFactory (line 290) | @Deprecated
    method logicalTypeFactory (line 297) | @Override
    method customConversion (line 306) | @Deprecated
    method customConversion (line 313) | @Override

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/Enums.java
  class Enums (line 20) | class Enums {
    method parseCaseInsensitive (line 21) | static <T extends Enum<T>> T parseCaseInsensitive(String label, T[] va...

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/FileExtensionSpec.java
  class FileExtensionSpec (line 25) | class FileExtensionSpec implements Spec<File> {
    method FileExtensionSpec (line 28) | FileExtensionSpec(String... extensions) {
    method FileExtensionSpec (line 32) | FileExtensionSpec(Collection<String> extensions) {
    method isSatisfiedBy (line 36) | @Override

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/FileState.java
  class FileState (line 22) | class FileState implements Comparable<FileState> {
    method FileState (line 28) | FileState(File file, String path) {
    method getFile (line 33) | File getFile() {
    method getDuplicateTypeNames (line 37) | Set<String> getDuplicateTypeNames() {
    method clearError (line 41) | void clearError() {
    method setError (line 45) | void setError(Throwable ex) {
    method addDuplicateTypeName (line 49) | void addDuplicateTypeName(String typeName) {
    method containsDuplicateTypeName (line 53) | public boolean containsDuplicateTypeName(String typeName) {
    method getPath (line 57) | public String getPath() {
    method getErrorMessage (line 61) | public String getErrorMessage() {
    method compareTo (line 65) | @Override
    method equals (line 70) | @Override
    method hashCode (line 82) | @Override

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/FileUtils.java
  class FileUtils (line 64) | class FileUtils {
    method openOutputStream (line 85) | private static FileOutputStream openOutputStream(File file) throws IOE...
    method writeStringToFile (line 116) | @SuppressWarnings("SameParameterValue")
    method writeJsonFile (line 134) | static void writeJsonFile(File file, String data) throws IOException {
    method projectRelativePath (line 142) | static String projectRelativePath(ProjectLayout projectLayout, File fi...

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/FilenameUtils.java
  class FilenameUtils (line 90) | class FilenameUtils {
    method indexOfLastSeparator (line 118) | private static int indexOfLastSeparator(String filename) {
    method indexOfExtension (line 140) | private static int indexOfExtension(String filename) {
    method getName (line 166) | private static String getName(String filename) {
    method getBaseName (line 191) | static String getBaseName(String filename) {
    method getExtension (line 212) | static String getExtension(String filename) {
    method removeExtension (line 242) | private static String removeExtension(String filename) {

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/GenerateAvroJavaTask.java
  class GenerateAvroJavaTask (line 63) | @SuppressWarnings("WeakerAccess")
    method GenerateAvroJavaTask (line 92) | @Inject
    method setClasspath (line 125) | public void setClasspath(FileCollection classpath) {
    method classpath (line 129) | public void classpath(Object... paths) {
    method getClasspath (line 133) | @Classpath
    method getOutputCharacterEncoding (line 138) | @Optional
    method setOutputCharacterEncoding (line 144) | public void setOutputCharacterEncoding(String outputCharacterEncoding) {
    method setOutputCharacterEncoding (line 148) | public void setOutputCharacterEncoding(Charset outputCharacterEncoding) {
    method getStringType (line 152) | @Input
    method setStringType (line 157) | public void setStringType(GenericData.StringType stringType) {
    method setStringType (line 161) | public void setStringType(String stringType) {
    method getFieldVisibility (line 165) | @Input
    method setFieldVisibility (line 170) | public void setFieldVisibility(String fieldVisibility) {
    method setFieldVisibility (line 174) | public void setFieldVisibility(SpecificCompiler.FieldVisibility fieldV...
    method getTemplateDirectory (line 178) | @Optional
    method setTemplateDirectory (line 184) | public void setTemplateDirectory(String templateDirectory) {
    method getAdditionalVelocityToolClasses (line 188) | @Optional
    method setAdditionalVelocityToolClasses (line 194) | public void setAdditionalVelocityToolClasses(List<String> additionalVe...
    method isCreateSetters (line 198) | public Property<Boolean> isCreateSetters() {
    method getCreateSetters (line 202) | @Input
    method setCreateSetters (line 207) | public void setCreateSetters(String createSetters) {
    method isCreateOptionalGetters (line 211) | public Property<Boolean> isCreateOptionalGetters() {
    method getCreateOptionalGetters (line 215) | @Input
    method setCreateOptionalGetters (line 220) | public void setCreateOptionalGetters(String createOptionalGetters) {
    method isGettersReturnOptional (line 224) | public Property<Boolean> isGettersReturnOptional() {
    method getGettersReturnOptional (line 228) | @Input
    method setGettersReturnOptional (line 233) | public void setGettersReturnOptional(String gettersReturnOptional) {
    method isOptionalGettersForNullableFieldsOnly (line 237) | public Property<Boolean> isOptionalGettersForNullableFieldsOnly() {
    method getOptionalGettersForNullableFieldsOnly (line 241) | @Input
    method setOptionalGettersForNullableFieldsOnly (line 246) | public void setOptionalGettersForNullableFieldsOnly(String optionalGet...
    method isEnableDecimalLogicalType (line 250) | public Property<Boolean> isEnableDecimalLogicalType() {
    method getEnableDecimalLogicalType (line 254) | @Input
    method setEnableDecimalLogicalType (line 259) | public void setEnableDecimalLogicalType(String enableDecimalLogicalTyp...
    method getConversionsAndTypeFactoriesClasspath (line 263) | @Optional
    method getLogicalTypeFactories (line 272) | @Deprecated
    method setLogicalTypeFactories (line 282) | @Deprecated
    method setLogicalTypeFactories (line 291) | @Deprecated
    method getLogicalTypeFactoryClassNames (line 297) | @Input
    method setLogicalTypeFactoryClassNames (line 303) | public void setLogicalTypeFactoryClassNames(Provider<? extends Map<? e...
    method setLogicalTypeFactoryClassNames (line 308) | public void setLogicalTypeFactoryClassNames(Map<? extends String,
    method getCustomConversions (line 316) | @Deprecated
    method setCustomConversions (line 326) | @Deprecated
    method setCustomConversions (line 334) | @Deprecated
    method getCustomConversionClassNames (line 339) | @Optional
    method setCustomConversionClassNames (line 345) | public void setCustomConversionClassNames(Provider<Iterable<String>> p...
    method setCustomConversionClassNames (line 349) | public void setCustomConversionClassNames(Iterable<String> customConve...
    method process (line 353) | @TaskAction
    method failOnUnsupportedFiles (line 377) | private void failOnUnsupportedFiles() {
    method processFiles (line 385) | private void processFiles() {
    method processProtoFiles (line 393) | private int processProtoFiles() {
    method processProtoFile (line 402) | private void processProtoFile(File sourceFile) {
    method processSchemaFiles (line 411) | private int processSchemaFiles() {
    method compile (line 427) | private void compile(SpecificCompiler compiler, File sourceFile) throw...
    method registerLogicalTypes (line 471) | private void registerLogicalTypes() {
    method resolveLocalTypeFactories (line 487) | @SuppressWarnings("unchecked")
    method registerCustomConversions (line 506) | private void registerCustomConversions(SpecificCompiler compiler) {
    method loadCustomConversionClasses (line 511) | private List<Class<?>> loadCustomConversionClasses() {
    method createConversionsAndTypeFactoriesClassLoader (line 527) | private ClassLoader createConversionsAndTypeFactoriesClassLoader() {
    method assembleClassLoader (line 542) | private ClassLoader assembleClassLoader() {

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/GenerateAvroProtocolTask.java
  class GenerateAvroProtocolTask (line 42) | @CacheableTask
    method GenerateAvroProtocolTask (line 48) | public GenerateAvroProtocolTask() {
    method setClasspath (line 54) | public void setClasspath(FileCollection classpath) {
    method classpath (line 58) | public void classpath(Object... paths) {
    method getClasspath (line 62) | @Classpath
    method process (line 67) | @TaskAction
    method failOnUnsupportedFiles (line 74) | private void failOnUnsupportedFiles() {
    method processFiles (line 82) | private void processFiles() {
    method processIDLFile (line 92) | private void processIDLFile(File idlFile, ClassLoader loader) {
    method assembleClassLoader (line 110) | private ClassLoader assembleClassLoader() {

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/GenerateAvroSchemaTask.java
  class GenerateAvroSchemaTask (line 28) | @CacheableTask
    method process (line 30) | @TaskAction
    method failOnUnsupportedFiles (line 37) | private void failOnUnsupportedFiles() {
    method processFiles (line 45) | private void processFiles() {
    method processProtoFile (line 54) | private void processProtoFile(File sourceFile) {

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/GradleCompatibility.java
  class GradleCompatibility (line 27) | class GradleCompatibility {
    method createExtensionWithObjectFactory (line 31) | static <T> T createExtensionWithObjectFactory(Project project, String ...
    method createConfigurableFileCollection (line 39) | @SuppressWarnings("deprecation")
    method getSourcesJarTaskName (line 50) | static String getSourcesJarTaskName(SourceSet sourceSet) {
    method addTestSources (line 58) | @SuppressWarnings("deprecation")
    method invokeMethod (line 75) | @SuppressWarnings("unchecked")

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/GradleFeatures.java
  type GradleFeatures (line 21) | enum GradleFeatures {
    method isSupportedBy (line 23) | boolean isSupportedBy(GradleVersion version) {
    method isSupportedBy (line 28) | @Override
    method isSupportedBy (line 34) | @Override
    method isSupportedBy (line 40) | @Override
    method isSupportedBy (line 46) | @Override
    method isSupportedBy (line 52) | abstract boolean isSupportedBy(GradleVersion version);
    method isSupported (line 53) | boolean isSupported() {

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/GradleVersions.java
  class GradleVersions (line 21) | class GradleVersions {

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/MapUtils.java
  class MapUtils (line 21) | class MapUtils {
    method asymmetricDifference (line 25) | static <K, V> Map<K, V> asymmetricDifference(Map<K, V> a, Map<K, V> b) {

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/OutputDirTask.java
  class OutputDirTask (line 30) | class OutputDirTask extends SourceTask {
    method OutputDirTask (line 33) | OutputDirTask() {
    method setOutputDir (line 37) | public void setOutputDir(File outputDir) {
    method getSource (line 42) | @Nonnull
    method getOutputDir (line 48) | @OutputDirectory
    method filterSources (line 53) | FileCollection filterSources(Spec<? super File> spec) {

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/ProcessingState.java
  class ProcessingState (line 29) | class ProcessingState {
    method ProcessingState (line 35) | ProcessingState(Iterable<File> files, ProjectLayout projectLayout) {
    method determineParserTypes (line 41) | Map<String, Schema> determineParserTypes(FileState fileState) {
    method processTypeDefinitions (line 53) | void processTypeDefinitions(FileState fileState, Map<String, Schema> n...
    method getFailedFiles (line 65) | Set<FileState> getFailedFiles() {
    method getTypeState (line 69) | private TypeState getTypeState(String typeName) {
    method queueForProcessing (line 78) | void queueForProcessing(FileState fileState) {
    method queueForDelayedProcessing (line 82) | void queueForDelayedProcessing(FileState fileState) {
    method queueDelayedFilesForProcessing (line 86) | private void queueDelayedFilesForProcessing() {
    method nextFileState (line 91) | FileState nextFileState() {
    method isWorkRemaining (line 95) | boolean isWorkRemaining() {
    method getProcessedTotal (line 99) | int getProcessedTotal() {
    method getSchemasForLocation (line 103) | Iterable<? extends Schema> getSchemasForLocation(String path) {
    method getSchemas (line 107) | Iterable<? extends Schema> getSchemas() {

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/ResolveAvroDependenciesTask.java
  class ResolveAvroDependenciesTask (line 16) | @CacheableTask
    method process (line 20) | @TaskAction
    method failOnUnsupportedFiles (line 27) | private void failOnUnsupportedFiles() {
    method processFiles (line 35) | private void processFiles() {
    method processSchemaFiles (line 40) | private int processSchemaFiles() {

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/SchemaResolver.java
  class SchemaResolver (line 15) | class SchemaResolver {
    method SchemaResolver (line 22) | SchemaResolver(ProjectLayout projectLayout, Logger logger) {
    method resolve (line 27) | ProcessingState resolve(Iterable<File> files) {
    method processSchemaFile (line 45) | private void processSchemaFile(ProcessingState processingState, FileSt...

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/SetBuilder.java
  class SetBuilder (line 23) | @SuppressWarnings("UnusedReturnValue")
    method add (line 27) | SetBuilder<T> add(T e) {
    method addAll (line 32) | final SetBuilder<T> addAll(T[] c) {
    method addAll (line 37) | SetBuilder<T> addAll(Collection<? extends T> c) {
    method remove (line 42) | SetBuilder<T> remove(T e) {
    method build (line 47) | Set<T> build() {

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/Strings.java
  class Strings (line 6) | class Strings {
    method Strings (line 10) | private Strings() { }
    method isEmpty (line 18) | static boolean isEmpty(String str) {
    method isNotEmpty (line 28) | static boolean isNotEmpty(String str) {
    method requireNotEmpty (line 41) | @SuppressWarnings({"UnusedReturnValue", "SameParameterValue"})

FILE: src/main/java/com/github/davidmc24/gradle/plugin/avro/TypeState.java
  class TypeState (line 23) | class TypeState {
    method TypeState (line 28) | TypeState(String name) {
    method processTypeDefinition (line 32) | void processTypeDefinition(String path, Schema schemaToProcess) {
    method getName (line 41) | String getName() {
    method getSchema (line 45) | Schema getSchema() {
    method hasLocation (line 49) | boolean hasLocation(String location) {

FILE: src/test/java/com/github/davidmc24/gradle/plugin/avro/test/custom/CommentGenerator.java
  class CommentGenerator (line 3) | public class CommentGenerator {
    method generateComment (line 7) | public String generateComment() {

FILE: src/test/java/com/github/davidmc24/gradle/plugin/avro/test/custom/TimeZoneConversion.java
  class TimeZoneConversion (line 23) | @SuppressWarnings("unused")
    method getConvertedType (line 27) | @Override
    method getLogicalTypeName (line 32) | @Override
    method fromCharSequence (line 37) | @Override
    method toCharSequence (line 42) | @Override
    method getRecommendedSchema (line 47) | @Override

FILE: src/test/java/com/github/davidmc24/gradle/plugin/avro/test/custom/TimeZoneLogicalType.java
  class TimeZoneLogicalType (line 21) | public class TimeZoneLogicalType extends LogicalType {
    method TimeZoneLogicalType (line 24) | private TimeZoneLogicalType() {
    method validate (line 28) | @Override

FILE: src/test/java/com/github/davidmc24/gradle/plugin/avro/test/custom/TimeZoneLogicalTypeFactory.java
  class TimeZoneLogicalTypeFactory (line 22) | public class TimeZoneLogicalTypeFactory implements LogicalTypes.LogicalT...
    method fromSchema (line 23) | @Override

FILE: src/test/java/com/github/davidmc24/gradle/plugin/avro/test/custom/TimestampGenerator.java
  class TimestampGenerator (line 4) | public class TimestampGenerator {
    method generateTimestampMessage (line 8) | public String generateTimestampMessage() {

FILE: test-project-kotlin/src/main/java/project/SystemUtil.java
  class SystemUtil (line 5) | class SystemUtil {
    class ExitTrappedException (line 8) | static class ExitTrappedException extends SecurityException {
      method ExitTrappedException (line 11) | ExitTrappedException(int status) {
      method getStatus (line 16) | int getStatus() {
    method forbidSystemExitCall (line 21) | static void forbidSystemExitCall() {
    method allowSystemExitCall (line 35) | static void allowSystemExitCall() {

FILE: test-project-kotlin/src/test/java/project/CLIComparisonTest.java
  class CLIComparisonTest (line 20) | public class CLIComparisonTest {
    method compareSpecificCompilerOutput (line 26) | @SuppressWarnings("unused")
    method compareSpecificCompilerOutput (line 36) | @ParameterizedTest
    method readFile (line 53) | private static String readFile(Path file) throws Exception {

FILE: test-project-kotlin/src/test/java/project/CLIUtil.java
  class CLIUtil (line 6) | class CLIUtil {
    method runCLITool (line 9) | static void runCLITool(String... args) throws Exception {

FILE: test-project-kotlin/src/test/java/project/RandomRecordTest.java
  class RandomRecordTest (line 17) | public class RandomRecordTest {
    method generateRandomRecords (line 22) | @SuppressWarnings("unused")
    method generateRandomRecords (line 32) | @ParameterizedTest

FILE: test-project-kotlin/src/test/java/project/RecordTest.java
  class RecordTest (line 21) | public class RecordTest {
    method buildAndWriteRecord (line 24) | @SuppressWarnings("unused")
    method buildAndWriteRecord (line 39) | @Disabled

FILE: test-project/src/main/java/project/SystemUtil.java
  class SystemUtil (line 5) | class SystemUtil {
    class ExitTrappedException (line 8) | static class ExitTrappedException extends SecurityException {
      method ExitTrappedException (line 11) | ExitTrappedException(int status) {
      method getStatus (line 16) | int getStatus() {
    method forbidSystemExitCall (line 21) | static void forbidSystemExitCall() {
    method allowSystemExitCall (line 35) | static void allowSystemExitCall() {

FILE: test-project/src/test/java/project/CLIComparisonTest.java
  class CLIComparisonTest (line 20) | public class CLIComparisonTest {
    method compareSpecificCompilerOutput (line 26) | @SuppressWarnings("unused")
    method compareSpecificCompilerOutput (line 36) | @ParameterizedTest
    method readFile (line 53) | private static String readFile(Path file) throws Exception {

FILE: test-project/src/test/java/project/CLIUtil.java
  class CLIUtil (line 6) | class CLIUtil {
    method runCLITool (line 9) | static void runCLITool(String... args) throws Exception {

FILE: test-project/src/test/java/project/RandomRecordTest.java
  class RandomRecordTest (line 17) | public class RandomRecordTest {
    method generateRandomRecords (line 22) | @SuppressWarnings("unused")
    method generateRandomRecords (line 32) | @ParameterizedTest

FILE: test-project/src/test/java/project/RecordTest.java
  class RecordTest (line 21) | public class RecordTest {
    method buildAndWriteRecord (line 24) | @SuppressWarnings("unused")
    method buildAndWriteRecord (line 39) | @Disabled
Condensed preview — 189 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (510K chars).
[
  {
    "path": ".editorconfig",
    "chars": 192,
    "preview": "# EditorConfig is awesome: http://EditorConfig.org\n\nroot = true\n\n[*]\nend_of_line = lf\ninsert_final_newline = true\ncharse"
  },
  {
    "path": ".gitattributes",
    "chars": 154,
    "preview": "#\n# https://help.github.com/articles/dealing-with-line-endings/\n#\n# These are explicitly windows files and should use cr"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 65,
    "preview": "# These are supported funding model platforms\n\ngithub: davidmc24\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 2053,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: bug\nassignees: ''\n\n---\n\n**Prerequisites"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 362,
    "preview": "blank_issues_enabled: false\ncontact_links:\n  - name: Feature requests and ideas\n    url: https://github.com/davidmc24/gr"
  },
  {
    "path": ".github/workflows/avro-compatibility.yml",
    "chars": 649,
    "preview": "name: Avro Compatibility Tests\non: [push, pull_request]\njobs:\n  test:\n    name: \"Compatibility: avro ${{ matrix.avro }}/"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 469,
    "preview": "name: CI Build\non: [push, pull_request]\njobs:\n  build:\n    name: \"Build\"\n    runs-on: ubuntu-latest\n    steps:\n    - use"
  },
  {
    "path": ".github/workflows/gradle-compatibility.yml",
    "chars": 1191,
    "preview": "name: Gradle Compatibility Tests\non: [push, pull_request]\njobs:\n  test:\n    name: \"Compatibility: gradle ${{ matrix.grad"
  },
  {
    "path": ".github/workflows/gradle-wrapper-validation.yml",
    "chars": 294,
    "preview": "# See https://github.com/marketplace/actions/gradle-wrapper-validation\nname: \"Validate Gradle Wrapper\"\non: [push, pull_r"
  },
  {
    "path": ".github/workflows/java-compatibility.yml",
    "chars": 3289,
    "preview": "# See https://docs.gradle.org/current/userguide/compatibility.html\nname: Java Compatibility Tests\non: [push, pull_reques"
  },
  {
    "path": ".github/workflows/os-compatibility.yml",
    "chars": 531,
    "preview": "name: OS Compatibility\non: [push, pull_request]\njobs:\n  build:\n    name: \"Compatibility: ${{ matrix.os }}\"\n    runs-on: "
  },
  {
    "path": ".github/workflows/publish.yml",
    "chars": 707,
    "preview": "name: Publish package to the Maven Central Repository\non:\n  release:\n    types: [created]\njobs:\n  publish:\n    runs-on: "
  },
  {
    "path": ".gitignore",
    "chars": 1014,
    "preview": "# Compiled source #\n###################\n*.com\n*.class\n*.dll\n*.exe\n*.o\n*.so\n\n# Packages #\n############\n# it's better to u"
  },
  {
    "path": "CHANGES.md",
    "chars": 19262,
    "preview": "# Change Log\n\n## Unreleased\n\n## 1.9.1\n* Upgrade commons-compress to 1.24.0 due to CVE-2023-42503\n\n## 1.9.0\n* Built using"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3443,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 2045,
    "preview": "# Contributing\n\n> Before contributing, please read our [code of conduct](https://github.com/davidmc24/gradle-avro-plugin"
  },
  {
    "path": "LICENSE",
    "chars": 10273,
    "preview": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AN"
  },
  {
    "path": "README.md",
    "chars": 19789,
    "preview": "# End of life\n\nThis project is no longer maintained.\nIts code has been donated to the [Apache Avro project](http://avro."
  },
  {
    "path": "RELEASING.md",
    "chars": 845,
    "preview": "# Release Process\n\n1. Update `CHANGES.md`\n1. Ensure that there is a milestone for the version, and that appropriate issu"
  },
  {
    "path": "build.gradle",
    "chars": 8334,
    "preview": "plugins {\n    id \"groovy\"\n    id \"checkstyle\"\n    id \"codenarc\"\n    id \"idea\"\n//    id \"jacoco\"\n    id \"maven-publish\"\n "
  },
  {
    "path": "config/checkstyle/checkstyle.xml",
    "chars": 5462,
    "preview": "<!DOCTYPE module PUBLIC\n    \"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN\"\n    \"https://checkstyle.org/dtds/confi"
  },
  {
    "path": "config/checkstyle/import-control.xml",
    "chars": 879,
    "preview": "<!DOCTYPE import-control PUBLIC\n    \"-//Checkstyle//DTD ImportControl Configuration 1.4//EN\"\n    \"https://checkstyle.org"
  },
  {
    "path": "config/codenarc/codenarc.groovy",
    "chars": 8421,
    "preview": "ruleset {\n\n    // rulesets/basic.xml\n    AssertWithinFinallyBlock\n    AssignmentInConditional\n    BigDecimalInstantiatio"
  },
  {
    "path": "design-docs/configurations-for-additional-schema.md",
    "chars": 783,
    "preview": "Periodically, we get requests for help figuring out how to\nload schema files from a JAR, whether it is a JAR from a\nrepo"
  },
  {
    "path": "design-docs/external-schemata-and-protocols.md",
    "chars": 929,
    "preview": "Originally requested as [#4](https://github.com/davidmc24/gradle-avro-plugin/issues/4).\nSome users would like the abilit"
  },
  {
    "path": "design-docs/run-avro-as-an-external-process.md",
    "chars": 1710,
    "preview": "Originally reported as [#27](https://github.com/davidmc24/gradle-avro-plugin/issues/27).\nCurrently, Avro generation take"
  },
  {
    "path": "examples/avsc-from-external-jar/README.md",
    "chars": 299,
    "preview": "# Purpose\n\nAn example project for having dependencies on .avsc schema files loaded from an external JAR file\n(not produc"
  },
  {
    "path": "examples/avsc-from-external-jar/build.gradle",
    "chars": 249,
    "preview": "plugins {\n    id \"com.github.davidmc24.gradle.plugin.avro\" version \"1.2.1\"\n}\n\nrepositories {\n    mavenCentral()\n}\ndepend"
  },
  {
    "path": "examples/avsc-from-external-jar/external-files/Breed.avsc",
    "chars": 205,
    "preview": "{\n    \"name\": \"Breed\",\n    \"namespace\": \"example\",\n    \"type\": \"enum\",\n    \"symbols\" : [\"ABYSSINIAN\", \"AMERICAN_SHORTHAI"
  },
  {
    "path": "examples/avsc-from-external-jar/external-files/Cat.avsc",
    "chars": 139,
    "preview": "{\n    \"name\": \"Cat\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"breed\", \"type\""
  },
  {
    "path": "examples/avsc-from-external-jar/gradle/wrapper/gradle-wrapper.properties",
    "chars": 200,
    "preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
  },
  {
    "path": "examples/avsc-from-external-jar/gradlew",
    "chars": 8047,
    "preview": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "examples/avsc-from-external-jar/gradlew.bat",
    "chars": 2763,
    "preview": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "examples/avsc-from-external-jar/settings.gradle",
    "chars": 164,
    "preview": "pluginManagement {\n    repositories {\n        gradlePluginPortal()\n        mavenCentral()\n        mavenLocal()\n    }\n}\n\n"
  },
  {
    "path": "examples/avsc-from-external-jar/src/main/avro/Cat.avsc",
    "chars": 139,
    "preview": "{\n    \"name\": \"Cat\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"breed\", \"type\""
  },
  {
    "path": "examples/avsc-from-subproject/README.md",
    "chars": 444,
    "preview": "# Purpose\n\nAn example project for having dependencies on .avsc schema files loaded from an JAR file\nproduced by a subpro"
  },
  {
    "path": "examples/avsc-from-subproject/cat/build.gradle",
    "chars": 1329,
    "preview": "import java.util.zip.ZipFile\n\nplugins {\n    id \"com.github.davidmc24.gradle.plugin.avro\" version \"1.2.1\"\n}\n\nrepositories"
  },
  {
    "path": "examples/avsc-from-subproject/cat/src/main/avro/Cat.avsc",
    "chars": 139,
    "preview": "{\n    \"name\": \"Cat\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"breed\", \"type\""
  },
  {
    "path": "examples/avsc-from-subproject/gradle/wrapper/gradle-wrapper.properties",
    "chars": 200,
    "preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
  },
  {
    "path": "examples/avsc-from-subproject/gradlew",
    "chars": 8047,
    "preview": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "examples/avsc-from-subproject/gradlew.bat",
    "chars": 2763,
    "preview": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "examples/avsc-from-subproject/schema/build.gradle",
    "chars": 276,
    "preview": "plugins {\n    id \"com.github.davidmc24.gradle.plugin.avro\" version \"1.2.1\"\n}\n\nrepositories {\n    mavenCentral()\n}\ndepend"
  },
  {
    "path": "examples/avsc-from-subproject/schema/src/main/avro/Breed.avsc",
    "chars": 205,
    "preview": "{\n    \"name\": \"Breed\",\n    \"namespace\": \"example\",\n    \"type\": \"enum\",\n    \"symbols\" : [\"ABYSSINIAN\", \"AMERICAN_SHORTHAI"
  },
  {
    "path": "examples/avsc-from-subproject/settings.gradle",
    "chars": 194,
    "preview": "pluginManagement {\n    repositories {\n        gradlePluginPortal()\n        mavenCentral()\n        mavenLocal()\n    }\n}\n\n"
  },
  {
    "path": "examples/default-custom-types/README.md",
    "chars": 353,
    "preview": "This example demonstrates a custom plugin that registers a logical type factory and custom conversion.\n\nTo simplify the "
  },
  {
    "path": "examples/default-custom-types/build.gradle",
    "chars": 146,
    "preview": "apply plugin: custom.AvroConventionPlugin\n\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation 'org.a"
  },
  {
    "path": "examples/default-custom-types/buildSrc/build.gradle",
    "chars": 184,
    "preview": "repositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation 'com.github.davidmc24.gradle.plugin:gradle-avro-p"
  },
  {
    "path": "examples/default-custom-types/buildSrc/src/main/java/custom/AvroConventionPlugin.java",
    "chars": 621,
    "preview": "package custom;\n\nimport org.gradle.api.Plugin;\nimport org.gradle.api.Project;\nimport com.github.davidmc24.gradle.plugin."
  },
  {
    "path": "examples/default-custom-types/buildSrc/src/main/java/custom/TimeZoneConversion.java",
    "chars": 964,
    "preview": "package custom;\n\nimport java.util.TimeZone;\nimport org.apache.avro.Conversion;\nimport org.apache.avro.LogicalType;\nimpor"
  },
  {
    "path": "examples/default-custom-types/buildSrc/src/main/java/custom/TimeZoneLogicalType.java",
    "chars": 580,
    "preview": "package custom;\n\nimport org.apache.avro.LogicalType;\nimport org.apache.avro.Schema;\n\npublic class TimeZoneLogicalType ex"
  },
  {
    "path": "examples/default-custom-types/buildSrc/src/main/java/custom/TimeZoneLogicalTypeFactory.java",
    "chars": 325,
    "preview": "package custom;\n\nimport org.apache.avro.LogicalType;\nimport org.apache.avro.LogicalTypes;\nimport org.apache.avro.Schema;"
  },
  {
    "path": "examples/default-custom-types/gradle/wrapper/gradle-wrapper.properties",
    "chars": 200,
    "preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
  },
  {
    "path": "examples/default-custom-types/gradlew",
    "chars": 5766,
    "preview": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or authors.\n#\n# Licensed under the Apache License, Version 2.0"
  },
  {
    "path": "examples/default-custom-types/gradlew.bat",
    "chars": 2763,
    "preview": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "examples/default-custom-types/settings.gradle",
    "chars": 42,
    "preview": "rootProject.name = 'default-custom-types'\n"
  },
  {
    "path": "examples/default-custom-types/src/main/avro/customConversion.avsc",
    "chars": 289,
    "preview": "{\"namespace\": \"example\",\n \"type\": \"record\",\n \"name\": \"Event\",\n \"fields\": [\n     {\"name\": \"name\", \"type\": \"string\"},\n    "
  },
  {
    "path": "examples/default-custom-types/src/main/java/custom/TimeZoneConversion.java",
    "chars": 964,
    "preview": "package custom;\n\nimport java.util.TimeZone;\nimport org.apache.avro.Conversion;\nimport org.apache.avro.LogicalType;\nimpor"
  },
  {
    "path": "examples/default-custom-types/src/main/java/custom/TimeZoneLogicalType.java",
    "chars": 580,
    "preview": "package custom;\n\nimport org.apache.avro.LogicalType;\nimport org.apache.avro.Schema;\n\npublic class TimeZoneLogicalType ex"
  },
  {
    "path": "examples/default-custom-types/src/main/java/custom/TimeZoneLogicalTypeFactory.java",
    "chars": 325,
    "preview": "package custom;\n\nimport org.apache.avro.LogicalType;\nimport org.apache.avro.LogicalTypes;\nimport org.apache.avro.Schema;"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "chars": 221,
    "preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
  },
  {
    "path": "gradle.properties",
    "chars": 147,
    "preview": "org.gradle.warning.mode=all\norg.gradle.parallel=true\norg.gradle.vfs.watch=true\nsystemProp.org.gradle.internal.launcher.w"
  },
  {
    "path": "gradlew",
    "chars": 8474,
    "preview": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "gradlew.bat",
    "chars": 2868,
    "preview": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "scripts/run-avro-cli.sh",
    "chars": 300,
    "preview": "#!/usr/bin/env bash\nset -ex\navroVersion=${1?\"Usage: $0 AVRO_VERSION ARGUMENTS\"};\nshift\nmkdir -p downloads\nwget --timesta"
  },
  {
    "path": "scripts/run-compile-schema.sh",
    "chars": 223,
    "preview": "#!/usr/bin/env bash\nset -ex\navroVersion=${1?\"Usage: $0 AVRO_VERSION SCHEMA_FILE\"};\nschemaFile=${2?\"Usage: $0 AVRO_VERSIO"
  },
  {
    "path": "settings.gradle",
    "chars": 428,
    "preview": "plugins {\n    id \"com.gradle.enterprise\" version \"3.3.4\"\n}\n\nrootProject.name = \"gradle-avro-plugin\"\n\ngradleEnterprise {\n"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/AvroBasePlugin.java",
    "chars": 2778,
    "preview": "/**\n * Copyright © 2014-2019 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/AvroExtension.java",
    "chars": 2618,
    "preview": "/**\n * Copyright © 2013-2019 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/AvroPlugin.java",
    "chars": 9264,
    "preview": "/**\n * Copyright © 2013-2019 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/AvroUtils.java",
    "chars": 2218,
    "preview": "package com.github.davidmc24.gradle.plugin.avro;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.re"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/Constants.java",
    "chars": 2997,
    "preview": "/**\n * Copyright © 2013-2015 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/DefaultAvroExtension.java",
    "chars": 12218,
    "preview": "/**\n * Copyright © 2013-2019 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/Enums.java",
    "chars": 1103,
    "preview": "/**\n * Copyright © 2015 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\")"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/FileExtensionSpec.java",
    "chars": 1300,
    "preview": "/**\n * Copyright © 2013-2015 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/FileState.java",
    "chars": 2158,
    "preview": "/**\n * Copyright © 2015 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\")"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/FileUtils.java",
    "chars": 6225,
    "preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOT"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/FilenameUtils.java",
    "chars": 9612,
    "preview": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements.  See the NOT"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/GenerateAvroJavaTask.java",
    "chars": 23757,
    "preview": "/**\n * Copyright © 2013-2019 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/GenerateAvroProtocolTask.java",
    "chars": 4535,
    "preview": "/**\n * Copyright © 2013-2019 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/GenerateAvroSchemaTask.java",
    "chars": 2655,
    "preview": "/*\n * Copyright © 2018-2019 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Licen"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/GradleCompatibility.java",
    "chars": 3527,
    "preview": "/*\n * Copyright © 2019 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/GradleFeatures.java",
    "chars": 1780,
    "preview": "/*\n * Copyright © 2019 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/GradleVersions.java",
    "chars": 1066,
    "preview": "/*\n * Copyright © 2019 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/MapUtils.java",
    "chars": 1135,
    "preview": "/**\n * Copyright © 2015 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\")"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/OutputDirTask.java",
    "chars": 1729,
    "preview": "/**\n * Copyright © 2013-2019 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/ProcessingState.java",
    "chars": 3695,
    "preview": "/**\n * Copyright © 2015 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\")"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/ResolveAvroDependenciesTask.java",
    "chars": 2238,
    "preview": "package com.github.davidmc24.gradle.plugin.avro;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.util.Set;"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/SchemaResolver.java",
    "chars": 4330,
    "preview": "package com.github.davidmc24.gradle.plugin.avro;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.util.Map;"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/SetBuilder.java",
    "chars": 1298,
    "preview": "/**\n * Copyright © 2013-2015 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/Strings.java",
    "chars": 1525,
    "preview": "package com.github.davidmc24.gradle.plugin.avro;\n\n/**\n * Utility methods for working with {@link String}s.\n */\nclass Str"
  },
  {
    "path": "src/main/java/com/github/davidmc24/gradle/plugin/avro/TypeState.java",
    "chars": 1624,
    "preview": "/**\n * Copyright © 2015 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\")"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/AvroBasePluginFunctionalSpec.groovy",
    "chars": 7315,
    "preview": "/*\n * Copyright © 2018 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/AvroPluginFunctionalSpec.groovy",
    "chars": 7181,
    "preview": "/*\n * Copyright © 2015-2017 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Licen"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/AvroPluginSpec.groovy",
    "chars": 3472,
    "preview": "/*\n * Copyright © 2013-2019 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Licen"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/AvroUtilsSpec.groovy",
    "chars": 3103,
    "preview": "package com.github.davidmc24.gradle.plugin.avro\n\nimport org.apache.avro.Protocol\nimport org.apache.avro.Schema\nimport sp"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/BuildCacheSupportFunctionalSpec.groovy",
    "chars": 4163,
    "preview": "/*\n * Copyright © 2018 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/CustomConversionFunctionalSpec.groovy",
    "chars": 9691,
    "preview": "/*\n * Copyright © 2019 David M. Carr\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/DuplicateHandlingFunctionalSpec.groovy",
    "chars": 5938,
    "preview": "/*\n * Copyright © 2015-2016 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Licen"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/EncodingFunctionalSpec.groovy",
    "chars": 4218,
    "preview": "/*\n * Copyright © 2015-2016 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Licen"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/EnumHandlingFunctionalSpec.groovy",
    "chars": 2718,
    "preview": "/*\n * Copyright © 2015-2016 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Licen"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/ExamplesFunctionalSpec.groovy",
    "chars": 1813,
    "preview": "/*\n * Copyright © 2018 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/FunctionalSpec.groovy",
    "chars": 6278,
    "preview": "/*\n * Copyright © 2015-2018 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Licen"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/GenerateAvroProtocolTaskFunctionalSpec.groovy",
    "chars": 4518,
    "preview": "/*\n * Copyright © 2019 David M. Carr\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/IntellijFunctionalSpec.groovy",
    "chars": 3384,
    "preview": "/*\n * Copyright © 2018 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/KotlinDSLCompatibilityFunctionalSpec.groovy",
    "chars": 1952,
    "preview": "package com.github.davidmc24.gradle.plugin.avro\n\nimport static org.gradle.testkit.runner.TaskOutcome.SUCCESS\n\nclass Kotl"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/OptionsFunctionalSpec.groovy",
    "chars": 16039,
    "preview": "/*\n * Copyright © 2015-2016 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Licen"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/ResolveAvroDependenciesTaskFunctionalSpec.groovy",
    "chars": 1590,
    "preview": "package com.github.davidmc24.gradle.plugin.avro\n\nimport org.hamcrest.MatcherAssert\nimport spock.lang.Subject\nimport uk.c"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/SchemaResolverSpec.groovy",
    "chars": 7281,
    "preview": "package com.github.davidmc24.gradle.plugin.avro\n\nimport org.gradle.api.GradleException\nimport org.gradle.api.Project\nimp"
  },
  {
    "path": "src/test/groovy/com/github/davidmc24/gradle/plugin/avro/StringsSpec.groovy",
    "chars": 1293,
    "preview": "package com.github.davidmc24.gradle.plugin.avro\n\nimport spock.lang.Specification\nimport spock.lang.Subject\nimport spock."
  },
  {
    "path": "src/test/java/com/github/davidmc24/gradle/plugin/avro/test/custom/CommentGenerator.java",
    "chars": 276,
    "preview": "package com.github.davidmc24.gradle.plugin.avro.test.custom;\n\npublic class CommentGenerator {\n\n    public static final S"
  },
  {
    "path": "src/test/java/com/github/davidmc24/gradle/plugin/avro/test/custom/TimeZoneConversion.java",
    "chars": 1606,
    "preview": "/*\n * Copyright © 2019 David M. Carr\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
  },
  {
    "path": "src/test/java/com/github/davidmc24/gradle/plugin/avro/test/custom/TimeZoneLogicalType.java",
    "chars": 1222,
    "preview": "/*\n * Copyright © 2019 David M. Carr\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
  },
  {
    "path": "src/test/java/com/github/davidmc24/gradle/plugin/avro/test/custom/TimeZoneLogicalTypeFactory.java",
    "chars": 967,
    "preview": "/*\n * Copyright © 2019 David M. Carr\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may no"
  },
  {
    "path": "src/test/java/com/github/davidmc24/gradle/plugin/avro/test/custom/TimestampGenerator.java",
    "chars": 386,
    "preview": "package com.github.davidmc24.gradle.plugin.avro.test.custom;\n\n\npublic class TimestampGenerator {\n\n    public static fina"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/Message.avsc",
    "chars": 251,
    "preview": "{\n  \"type\" : \"record\",\n  \"name\" : \"Message\",\n  \"namespace\" : \"org.apache.avro.test\",\n  \"fields\" : [ {\n    \"name\" : \"to\","
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/customConversion.avpr",
    "chars": 390,
    "preview": "{\"namespace\": \"test\",\n \"protocol\": \"CustomConversion\",\n \"types\": [\n     {\"name\": \"Event\", \"type\": \"record\",\n      \"field"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/customConversion.avsc",
    "chars": 286,
    "preview": "{\"namespace\": \"test\",\n \"type\": \"record\",\n \"name\": \"Event\",\n \"fields\": [\n     {\"name\": \"name\", \"type\": \"string\"},\n     {\""
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/dependent.avdl",
    "chars": 1079,
    "preview": "/**\n * Copyright 2019 Paychex, Inc.\n * Licensed pursuant to the terms of the Apache License, Version 2.0 (the \"License\")"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/Cat.avsc",
    "chars": 350,
    "preview": "{\n    \"name\": \"Cat\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\": [\n        { \"name\": \"name\", \"type\":"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/ContainsFixed1.avsc",
    "chars": 196,
    "preview": "{\n    \"name\": \"ContainsFixed1\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\": [\n        { \"name\": \"pic"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/ContainsFixed2.avsc",
    "chars": 196,
    "preview": "{\n    \"name\": \"ContainsFixed2\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\": [\n        { \"name\": \"pic"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/ContainsFixed3.avsc",
    "chars": 196,
    "preview": "{\n    \"name\": \"ContainsFixed3\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\": [\n        { \"name\": \"pic"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/Dog.avsc",
    "chars": 341,
    "preview": "{\n    \"name\": \"Dog\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\": [\n        { \"name\": \"name\", \"type\":"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/Fish.avsc",
    "chars": 704,
    "preview": "{\n    \"name\": \"Fish\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\": [\n        { \"name\": \"name\", \"type\""
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/Person.avsc",
    "chars": 353,
    "preview": "{\n    \"name\": \"Person\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\": [\n        { \"name\": \"name\", \"typ"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/Spider.avsc",
    "chars": 400,
    "preview": "{\n    \"name\": \"Spider\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\": [\n        { \"name\": \"name\", \"typ"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/duplicate/duplicateInSingleFile.avsc",
    "chars": 954,
    "preview": "{\n    \"type\" : \"record\",\n    \"name\" : \"Fail\",\n    \"namespace\" : \"example.avro\",\n    \"fields\" : [ {\n        \"name\" : \"sta"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/enumField.avsc",
    "chars": 299,
    "preview": "{\n    \"namespace\": \"example.avro\",\n    \"type\": \"record\",\n    \"name\": \"Test\",\n    \"fields\": [\n        {\n            \"name"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/enumMalformed.avsc",
    "chars": 221,
    "preview": "{\n    \"namespace\": \"example.avro\",\n    \"type\": \"record\",\n    \"name\": \"Test\",\n    \"fields\": [\n        {\n            \"name"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/enumSimple.avsc",
    "chars": 164,
    "preview": "{\n    \"namespace\": \"example.avro\",\n    \"type\": \"enum\",\n    \"symbols\": [\n        \"zero\",\n        \"int\",\n        \"two\",\n  "
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/enumUnion.avsc",
    "chars": 364,
    "preview": "{\n    \"namespace\": \"example.avro\",\n    \"type\": \"record\",\n    \"name\": \"Test\",\n    \"fields\": [\n        {\n            \"name"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/enumUseSimple.avsc",
    "chars": 165,
    "preview": "{\"namespace\": \"example.avro\",\n \"type\": \"record\",\n \"name\": \"User\",\n \"fields\": [\n     {\"name\": \"name\", \"type\": \"string\"},\n"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/helloWorld.kt",
    "chars": 827,
    "preview": "/*\n * Copyright © 2017 Commerce Technologies, LLC.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/idioma.avsc",
    "chars": 211,
    "preview": "{\n    \"namespace\": \"example.avro\",\n    \"type\": \"enum\",\n    \"symbols\": [\n        \"alemán\",\n        \"chino\",\n        \"espa"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/interop-1.9.avdl",
    "chars": 1650,
    "preview": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NO"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/interop.avdl",
    "chars": 1594,
    "preview": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NO"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/mail.avpr",
    "chars": 573,
    "preview": "{\"namespace\": \"org.apache.avro.test\",\n \"protocol\": \"Mail\",\n\n \"types\": [\n     {\"name\": \"Message\", \"type\": \"record\",\n     "
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/namespaced-idl/v1/test.avdl",
    "chars": 108,
    "preview": "@namespace(\"org.example.v1\")\nprotocol TestProtocol {\n    record TestRecord {\n        string field1;\n    }\n}\n"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/namespaced-idl/v1/test_same_protocol.avdl",
    "chars": 117,
    "preview": "@namespace(\"org.example.v1\")\nprotocol TestProtocol {\n    record SomeOtherTestRecord {\n        string field1;\n    }\n}\n"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/namespaced-idl/v2/test.avdl",
    "chars": 131,
    "preview": "@namespace(\"org.example.v2\")\nprotocol TestProtocol {\n    record TestRecord {\n        string field1;\n        string field"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/record-tools.vm",
    "chars": 34055,
    "preview": "##\n## Licensed to the Apache Software Foundation (ASF) under one\n## or more contributor license agreements.  See the NOT"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/record.vm",
    "chars": 33980,
    "preview": "##\n## Licensed to the Apache Software Foundation (ASF) under one\n## or more contributor license agreements.  See the NOT"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/shared.avdl",
    "chars": 1016,
    "preview": "/**\n * Copyright 2019 Paychex, Inc.\n * Licensed pursuant to the terms of the Apache License, Version 2.0 (the \"License\")"
  },
  {
    "path": "src/test/resources/com/github/davidmc24/gradle/plugin/avro/user.avsc",
    "chars": 482,
    "preview": "{\"namespace\": \"example.avro\",\n \"type\": \"record\",\n \"name\": \"User\",\n \"fields\": [\n     {\"name\": \"name\", \"type\": \"string\"},\n"
  },
  {
    "path": "src/test/resources/examples/inline/Cat.avsc",
    "chars": 428,
    "preview": "{\n    \"name\": \"Cat\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\n            \"name\": \"b"
  },
  {
    "path": "src/test/resources/examples/separate/Breed.avsc",
    "chars": 205,
    "preview": "{\n    \"name\": \"Breed\",\n    \"namespace\": \"example\",\n    \"type\": \"enum\",\n    \"symbols\" : [\"ABYSSINIAN\", \"AMERICAN_SHORTHAI"
  },
  {
    "path": "src/test/resources/examples/separate/Cat.avsc",
    "chars": 139,
    "preview": "{\n    \"name\": \"Cat\",\n    \"namespace\": \"example\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"breed\", \"type\""
  },
  {
    "path": "src/test/resources/resolver/SimpleEnum.avsc",
    "chars": 120,
    "preview": "{\n    \"name\": \"SimpleEnum\",\n    \"namespace\": \"resolver\",\n    \"type\": \"enum\",\n    \"symbols\" : [\"val1\", \"val2\", \"val3\"]\n}\n"
  },
  {
    "path": "src/test/resources/resolver/SimpleFixed.avsc",
    "chars": 96,
    "preview": "{\n    \"name\": \"SimpleFixed\",\n    \"type\": \"fixed\",\n    \"namespace\": \"resolver\",\n    \"size\": 16\n}\n"
  },
  {
    "path": "src/test/resources/resolver/SimpleRecord.avsc",
    "chars": 152,
    "preview": "{\n    \"name\": \"SimpleRecord\",\n    \"type\": \"record\",\n    \"namespace\": \"resolver\",\n    \"fields\": [\n        { \"name\": \"fiel"
  },
  {
    "path": "src/test/resources/resolver/UseArray.avsc",
    "chars": 342,
    "preview": "{\n    \"name\": \"UseRecord\",\n    \"namespace\": \"resolver\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"field1\""
  },
  {
    "path": "src/test/resources/resolver/UseArrayWithType.avsc",
    "chars": 375,
    "preview": "{\n    \"name\": \"UseRecord\",\n    \"namespace\": \"resolver\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"field1\""
  },
  {
    "path": "src/test/resources/resolver/UseEnum.avsc",
    "chars": 150,
    "preview": "{\n    \"name\": \"UseEnum\",\n    \"namespace\": \"resolver\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"field1\", "
  },
  {
    "path": "src/test/resources/resolver/UseEnumWithType.avsc",
    "chars": 161,
    "preview": "{\n    \"name\": \"UseEnum\",\n    \"namespace\": \"resolver\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"field1\", "
  },
  {
    "path": "src/test/resources/resolver/UseFixed.avsc",
    "chars": 151,
    "preview": "{\n    \"name\": \"UseEnum\",\n    \"namespace\": \"resolver\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"field1\", "
  },
  {
    "path": "src/test/resources/resolver/UseFixedWithType.avsc",
    "chars": 162,
    "preview": "{\n    \"name\": \"UseEnum\",\n    \"namespace\": \"resolver\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"field1\", "
  },
  {
    "path": "src/test/resources/resolver/UseMap.avsc",
    "chars": 339,
    "preview": "{\n    \"name\": \"UseRecord\",\n    \"namespace\": \"resolver\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"field1\""
  },
  {
    "path": "src/test/resources/resolver/UseMapWithType.avsc",
    "chars": 372,
    "preview": "{\n    \"name\": \"UseRecord\",\n    \"namespace\": \"resolver\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"field1\""
  },
  {
    "path": "src/test/resources/resolver/UseRecord.avsc",
    "chars": 154,
    "preview": "{\n    \"name\": \"UseRecord\",\n    \"namespace\": \"resolver\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"field1\""
  },
  {
    "path": "src/test/resources/resolver/UseRecordWithType.avsc",
    "chars": 165,
    "preview": "{\n    \"name\": \"UseRecord\",\n    \"namespace\": \"resolver\",\n    \"type\": \"record\",\n    \"fields\" : [\n        {\"name\": \"field1\""
  },
  {
    "path": "test-project/build.gradle",
    "chars": 735,
    "preview": "plugins {\n    id \"idea\"\n    id \"com.github.davidmc24.gradle.plugin.avro\" version \"1.2.0\"\n//    id \"com.github.davidmc24."
  },
  {
    "path": "test-project/gradle/wrapper/gradle-wrapper.properties",
    "chars": 202,
    "preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
  },
  {
    "path": "test-project/gradlew",
    "chars": 5774,
    "preview": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or authors.\n#\n# Licensed under the Apache License, Version 2.0"
  },
  {
    "path": "test-project/gradlew.bat",
    "chars": 2763,
    "preview": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "test-project/settings.gradle",
    "chars": 154,
    "preview": "pluginManagement {\n    repositories {\n        gradlePluginPortal()\n        mavenCentral()\n        mavenLocal()\n    }\n}\n\n"
  },
  {
    "path": "test-project/src/main/avro/BuggyRecord.avsc",
    "chars": 528,
    "preview": "{\n   \"namespace\":\"com.example\",\n   \"type\":\"record\",\n   \"name\":\"BuggyRecord\",\n   \"fields\":[\n      {\n         \"name\":\"my_m"
  },
  {
    "path": "test-project/src/main/avro/BuggyRecordWorkaround.avsc",
    "chars": 529,
    "preview": "{\n   \"namespace\":\"com.example\",\n   \"type\":\"record\",\n   \"name\":\"BuggyRecordWorkaround\",\n   \"fields\":[\n      {\n         \"n"
  },
  {
    "path": "test-project/src/main/avro/Messages.avsc",
    "chars": 361,
    "preview": "{\n    \"type\": \"record\",\n\t  \"name\": \"Messages\",\n\t  \"namespace\": \"com.somedomain\",\n\t  \"fields\": [\n\t\t{\n\t\t  \"name\": \"start\","
  },
  {
    "path": "test-project/src/main/avro/UUIDTestRecord.avsc",
    "chars": 182,
    "preview": "{\n  \"name\": \"UUIDTestRecord\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"id\",\n      \"type\": {\n        \"type\""
  },
  {
    "path": "test-project/src/main/java/project/SystemUtil.java",
    "chars": 1160,
    "preview": "package project;\n\nimport java.security.Permission;\n\nclass SystemUtil {\n    private static final String PERMISSION_PREFIX"
  },
  {
    "path": "test-project/src/test/java/project/CLIComparisonTest.java",
    "chars": 2265,
    "preview": "package project;\n\nimport org.junit.jupiter.api.Assertions;\nimport org.junit.jupiter.api.io.TempDir;\nimport org.junit.jup"
  },
  {
    "path": "test-project/src/test/java/project/CLIUtil.java",
    "chars": 535,
    "preview": "package project;\n\nimport org.apache.avro.tool.Main;\nimport org.junit.jupiter.api.Assertions;\n\nclass CLIUtil {\n    privat"
  },
  {
    "path": "test-project/src/test/java/project/RandomRecordTest.java",
    "chars": 1582,
    "preview": "package project;\n\nimport org.apache.avro.specific.SpecificRecord;\nimport org.junit.jupiter.api.io.TempDir;\nimport org.ju"
  },
  {
    "path": "test-project/src/test/java/project/RecordTest.java",
    "chars": 2107,
    "preview": "package project;\n\nimport com.example.BuggyRecord;\nimport com.example.BuggyRecordWorkaround;\nimport com.somedomain.Messag"
  },
  {
    "path": "test-project-kotlin/build.gradle.kts",
    "chars": 757,
    "preview": "plugins {\n    id(\"idea\")\n    id(\"com.github.davidmc24.gradle.plugin.avro\") version (\"1.2.0\")\n//    id \"com.github.davidm"
  },
  {
    "path": "test-project-kotlin/gradle/wrapper/gradle-wrapper.properties",
    "chars": 202,
    "preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
  },
  {
    "path": "test-project-kotlin/gradlew",
    "chars": 5774,
    "preview": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or authors.\n#\n# Licensed under the Apache License, Version 2.0"
  },
  {
    "path": "test-project-kotlin/gradlew.bat",
    "chars": 2763,
    "preview": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "test-project-kotlin/settings.gradle.kts",
    "chars": 154,
    "preview": "pluginManagement {\n    repositories {\n        gradlePluginPortal()\n        mavenCentral()\n        mavenLocal()\n    }\n}\n\n"
  },
  {
    "path": "test-project-kotlin/src/main/avro/BuggyRecord.avsc",
    "chars": 528,
    "preview": "{\n   \"namespace\":\"com.example\",\n   \"type\":\"record\",\n   \"name\":\"BuggyRecord\",\n   \"fields\":[\n      {\n         \"name\":\"my_m"
  },
  {
    "path": "test-project-kotlin/src/main/avro/BuggyRecordWorkaround.avsc",
    "chars": 529,
    "preview": "{\n   \"namespace\":\"com.example\",\n   \"type\":\"record\",\n   \"name\":\"BuggyRecordWorkaround\",\n   \"fields\":[\n      {\n         \"n"
  },
  {
    "path": "test-project-kotlin/src/main/avro/Messages.avsc",
    "chars": 361,
    "preview": "{\n    \"type\": \"record\",\n\t  \"name\": \"Messages\",\n\t  \"namespace\": \"com.somedomain\",\n\t  \"fields\": [\n\t\t{\n\t\t  \"name\": \"start\","
  },
  {
    "path": "test-project-kotlin/src/main/avro/UUIDTestRecord.avsc",
    "chars": 182,
    "preview": "{\n  \"name\": \"UUIDTestRecord\",\n  \"type\": \"record\",\n  \"fields\": [\n    {\n      \"name\": \"id\",\n      \"type\": {\n        \"type\""
  },
  {
    "path": "test-project-kotlin/src/main/java/project/SystemUtil.java",
    "chars": 1160,
    "preview": "package project;\n\nimport java.security.Permission;\n\nclass SystemUtil {\n    private static final String PERMISSION_PREFIX"
  },
  {
    "path": "test-project-kotlin/src/test/java/project/CLIComparisonTest.java",
    "chars": 2265,
    "preview": "package project;\n\nimport org.junit.jupiter.api.Assertions;\nimport org.junit.jupiter.api.io.TempDir;\nimport org.junit.jup"
  },
  {
    "path": "test-project-kotlin/src/test/java/project/CLIUtil.java",
    "chars": 535,
    "preview": "package project;\n\nimport org.apache.avro.tool.Main;\nimport org.junit.jupiter.api.Assertions;\n\nclass CLIUtil {\n    privat"
  },
  {
    "path": "test-project-kotlin/src/test/java/project/RandomRecordTest.java",
    "chars": 1582,
    "preview": "package project;\n\nimport org.apache.avro.specific.SpecificRecord;\nimport org.junit.jupiter.api.io.TempDir;\nimport org.ju"
  },
  {
    "path": "test-project-kotlin/src/test/java/project/RecordTest.java",
    "chars": 2107,
    "preview": "package project;\n\nimport com.example.BuggyRecord;\nimport com.example.BuggyRecordWorkaround;\nimport com.somedomain.Messag"
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the davidmc24/gradle-avro-plugin GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 189 files (461.4 KB), approximately 120.4k tokens, and a symbol index with 333 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!