diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 477c9c2..80ed22e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,4 +106,9 @@ jobs: tar xf targets.tar rm targets.tar - - run: sbt ++${{ matrix.scala }} ci-release + - env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + run: sbt ++${{ matrix.scala }} ci-release diff --git a/LICENSE b/LICENSE index 69b77a3..6ac1cdd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,12 +1,12 @@ Copyright (c) 2012 Juan Manuel Caicedo Carvajal All rights reserved. -Redistribution and use in source and binary forms, with or without +Redistribution and use in source and artifact forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright +2. Redistributions in artifact form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products diff --git a/README.md b/README.md index 16b04d9..65616f2 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add the plugin according to the [sbt documentation](https://www.scala-sbt.org/1. For instance, add the following lines to `project/plugins.sbt`: ``` -addSbtPlugin("com.cavorite" % "sbt-avro" % "3.1.0") +addSbtPlugin("com.github.sbt" % "sbt-avro" % "3.2.0") // Java sources compiled with one version of Avro might be incompatible with a // different version of the Avro library. Therefore we specify the compiler diff --git a/build.sbt b/build.sbt index e947c9d..981fc52 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ ThisBuild / dynverSonatypeSnapshots := true ThisBuild / version := { val orig = (ThisBuild / version).value - if (orig.endsWith("-SNAPSHOT")) "3.1.1-SNAPSHOT" + if (orig.endsWith("-SNAPSHOT")) "3.2.0-SNAPSHOT" else orig } @@ -13,13 +13,21 @@ ThisBuild / githubWorkflowBuild := Seq( ThisBuild / githubWorkflowTargetBranches := Seq("master") ThisBuild / githubWorkflowJavaVersions := Seq("1.8", "1.11") ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))) -ThisBuild / githubWorkflowPublish := Seq(WorkflowStep.Sbt(List("ci-release"))) +ThisBuild / githubWorkflowPublish := Seq(WorkflowStep.Sbt( + commands = List("ci-release"), + env = Map( + "PGP_PASSPHRASE" -> "${{ secrets.PGP_PASSPHRASE }}", + "PGP_SECRET" -> "${{ secrets.PGP_SECRET }}", + "SONATYPE_PASSWORD" -> "${{ secrets.SONATYPE_PASSWORD }}", + "SONATYPE_USERNAME" -> "${{ secrets.SONATYPE_USERNAME }}" + ) +)) lazy val `sbt-avro`: Project = project .in(file(".")) .enablePlugins(SbtPlugin) .settings( - organization := "com.cavorite", + organization := "com.github.sbt", description := "Sbt plugin for compiling Avro sources", homepage := Some(url("https://github.com/sbt/sbt-avro")), pluginCrossBuild / sbtVersion := "1.2.8", @@ -29,11 +37,6 @@ lazy val `sbt-avro`: Project = project Dependencies.Test.Spec2 ), licenses += ("BSD 3-Clause", url("https://github.com/sbt/sbt-avro/blob/master/LICENSE")), - publishTo := (bintray / publishTo).value, - publishMavenStyle := false, - bintrayOrganization := Some("sbt"), - bintrayRepository := "sbt-plugin-releases", - bintrayPackage := "sbt-avro2", scriptedLaunchOpts ++= Seq( "-Xmx1024M", "-Dplugin.version=" + version.value, diff --git a/project/plugins.sbt b/project/plugins.sbt index 2b9205a..49702eb 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,2 @@ -addSbtPlugin("org.foundweekends" %% "sbt-bintray" % "0.6.1") addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.13.0") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") diff --git a/src/main/java/com/spotify/avro/mojo/AvroFileRef.java b/src/main/java/com/github/sbt/avro/mojo/AvroFileRef.java similarity index 97% rename from src/main/java/com/spotify/avro/mojo/AvroFileRef.java rename to src/main/java/com/github/sbt/avro/mojo/AvroFileRef.java index 8392e9f..30cfc84 100644 --- a/src/main/java/com/spotify/avro/mojo/AvroFileRef.java +++ b/src/main/java/com/github/sbt/avro/mojo/AvroFileRef.java @@ -1,4 +1,4 @@ -package com.spotify.avro.mojo; +package com.github.sbt.avro.mojo; import java.io.File; import java.util.Objects; diff --git a/src/main/java/com/spotify/avro/mojo/AvscFilesCompiler.java b/src/main/java/com/github/sbt/avro/mojo/AvscFilesCompiler.java similarity index 99% rename from src/main/java/com/spotify/avro/mojo/AvscFilesCompiler.java rename to src/main/java/com/github/sbt/avro/mojo/AvscFilesCompiler.java index e190d57..3480e5f 100644 --- a/src/main/java/com/spotify/avro/mojo/AvscFilesCompiler.java +++ b/src/main/java/com/github/sbt/avro/mojo/AvscFilesCompiler.java @@ -1,4 +1,4 @@ -package com.spotify.avro.mojo; +package com.github.sbt.avro.mojo; import org.apache.avro.Schema; import org.apache.avro.SchemaParseException; diff --git a/src/main/java/com/spotify/avro/mojo/SchemaGenerationException.java b/src/main/java/com/github/sbt/avro/mojo/SchemaGenerationException.java similarity index 87% rename from src/main/java/com/spotify/avro/mojo/SchemaGenerationException.java rename to src/main/java/com/github/sbt/avro/mojo/SchemaGenerationException.java index 30e4b10..923cdf1 100644 --- a/src/main/java/com/spotify/avro/mojo/SchemaGenerationException.java +++ b/src/main/java/com/github/sbt/avro/mojo/SchemaGenerationException.java @@ -1,4 +1,4 @@ -package com.spotify.avro.mojo; +package com.github.sbt.avro.mojo; public class SchemaGenerationException extends RuntimeException { diff --git a/src/main/java/com/spotify/avro/mojo/SchemaParserBuilder.java b/src/main/java/com/github/sbt/avro/mojo/SchemaParserBuilder.java similarity index 74% rename from src/main/java/com/spotify/avro/mojo/SchemaParserBuilder.java rename to src/main/java/com/github/sbt/avro/mojo/SchemaParserBuilder.java index af2b8df..394960e 100644 --- a/src/main/java/com/spotify/avro/mojo/SchemaParserBuilder.java +++ b/src/main/java/com/github/sbt/avro/mojo/SchemaParserBuilder.java @@ -1,4 +1,4 @@ -package com.spotify.avro.mojo; +package com.github.sbt.avro.mojo; import org.apache.avro.Schema; diff --git a/src/main/scala/sbtavro/DefaultSchemaParserBuilder.scala b/src/main/scala/com/github/sbt/avro/DefaultSchemaParserBuilder.scala similarity index 91% rename from src/main/scala/sbtavro/DefaultSchemaParserBuilder.scala rename to src/main/scala/com/github/sbt/avro/DefaultSchemaParserBuilder.scala index d118d80..dfde412 100644 --- a/src/main/scala/sbtavro/DefaultSchemaParserBuilder.scala +++ b/src/main/scala/com/github/sbt/avro/DefaultSchemaParserBuilder.scala @@ -1,7 +1,8 @@ -package sbtavro +package com.github.sbt.avro -import com.spotify.avro.mojo.SchemaParserBuilder +import com.github.sbt.avro.mojo.SchemaParserBuilder import org.apache.avro.Schema + import scala.collection.JavaConverters._ case class DefaultSchemaParserBuilder(types: Iterable[Schema], diff --git a/src/main/scala/sbtavro/SbtAvro.scala b/src/main/scala/com/github/sbt/avro/SbtAvro.scala similarity index 98% rename from src/main/scala/sbtavro/SbtAvro.scala rename to src/main/scala/com/github/sbt/avro/SbtAvro.scala index 262588b..f36c63b 100644 --- a/src/main/scala/sbtavro/SbtAvro.scala +++ b/src/main/scala/com/github/sbt/avro/SbtAvro.scala @@ -1,7 +1,6 @@ -package sbtavro +package com.github.sbt.avro import java.io.File - import org.apache.avro.Protocol import org.apache.avro.compiler.idl.Idl import org.apache.avro.compiler.specific.SpecificCompiler @@ -11,7 +10,7 @@ import sbt.Keys._ import sbt._ import Path.relativeTo import CrossVersion.partialVersion -import com.spotify.avro.mojo.{AvroFileRef, SchemaParserBuilder} +import com.github.sbt.avro.mojo.{AvroFileRef, SchemaParserBuilder} import sbt.librarymanagement.DependencyFilter /** @@ -158,7 +157,7 @@ object SbtAvro extends AutoPlugin { } def compileAvscs(refs: Seq[AvroFileRef], target: File, log: Logger, stringType: StringType, fieldVisibility: FieldVisibility, enableDecimalLogicalType: Boolean, useNamespace: Boolean, optionalGetters: Option[Boolean], createSetters: Boolean, builder: SchemaParserBuilder) = { - import com.spotify.avro.mojo._ + import com.github.sbt.avro.mojo._ import scala.collection.JavaConverters._ val compiler = new AvscFilesCompiler(builder) diff --git a/src/sbt-test/sbt-avro/avscparser/build.sbt b/src/sbt-test/sbt-avro/avscparser/build.sbt index 83eb0d7..10d8e23 100644 --- a/src/sbt-test/sbt-avro/avscparser/build.sbt +++ b/src/sbt-test/sbt-avro/avscparser/build.sbt @@ -10,5 +10,5 @@ libraryDependencies ++= Seq( avroSchemaParserBuilder := AnnotateWithArtifactSchemaParser .newBuilder(projectID.value) .copy( - types = singletonMap("B", Schema.createEnum("B", null, "com.cavorite.test.avscparser", singletonList("B1")) + types = singletonMap("B", Schema.createEnum("B", null, "com.github.sbt.avro.test", singletonList("B1")) )) diff --git a/src/sbt-test/sbt-avro/avscparser/project/AnnotateWithArtifactSchemaParser.scala b/src/sbt-test/sbt-avro/avscparser/project/AnnotateWithArtifactSchemaParser.scala index 9233636..2e86f87 100644 --- a/src/sbt-test/sbt-avro/avscparser/project/AnnotateWithArtifactSchemaParser.scala +++ b/src/sbt-test/sbt-avro/avscparser/project/AnnotateWithArtifactSchemaParser.scala @@ -1,4 +1,4 @@ -import com.spotify.avro.mojo.SchemaParserBuilder +import com.github.sbt.avro.mojo.SchemaParserBuilder import org.apache.avro.Schema import sbt.ModuleID @@ -12,7 +12,7 @@ class AnnotateWithArtifactSchemaParser( override def parse(file: java.io.File): org.apache.avro.Schema = { val schema = super.parse(file) if (schema.getType == org.apache.avro.Schema.Type.RECORD) { - schema.addProp("com.cavorite.sbt-avro.artifact", moduleID.toString()) + schema.addProp("com.github.sbt.sbt-avro.artifact", moduleID.toString()) } schema } diff --git a/src/sbt-test/sbt-avro/avscparser/project/plugins.sbt b/src/sbt-test/sbt-avro/avscparser/project/plugins.sbt index ed0a543..023d1d6 100644 --- a/src/sbt-test/sbt-avro/avscparser/project/plugins.sbt +++ b/src/sbt-test/sbt-avro/avscparser/project/plugins.sbt @@ -1,5 +1,5 @@ sys.props.get("plugin.version") match { - case Some(x) => addSbtPlugin("com.cavorite" % "sbt-avro" % x) + case Some(x) => addSbtPlugin("com.github.sbt" % "sbt-avro" % x) case _ => sys.error("""|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) } diff --git a/src/sbt-test/sbt-avro/avscparser/src/main/avro/a.avsc b/src/sbt-test/sbt-avro/avscparser/src/main/avro/a.avsc index 37a3af8..186ad92 100644 --- a/src/sbt-test/sbt-avro/avscparser/src/main/avro/a.avsc +++ b/src/sbt-test/sbt-avro/avscparser/src/main/avro/a.avsc @@ -1,6 +1,6 @@ { "name": "A", - "namespace": "com.cavorite.test.avscparser", + "namespace": "com.github.sbt.avro.test", "type": "record", "fields": [ { diff --git a/src/sbt-test/sbt-avro/avscparser/src/test/scala/sbtavro/AvscParserSpec.scala b/src/sbt-test/sbt-avro/avscparser/src/test/scala/com/github/sbt/avro/test/AvscParserSpec.scala similarity index 56% rename from src/sbt-test/sbt-avro/avscparser/src/test/scala/sbtavro/AvscParserSpec.scala rename to src/sbt-test/sbt-avro/avscparser/src/test/scala/com/github/sbt/avro/test/AvscParserSpec.scala index 06ab898..a82a5e1 100644 --- a/src/sbt-test/sbt-avro/avscparser/src/test/scala/sbtavro/AvscParserSpec.scala +++ b/src/sbt-test/sbt-avro/avscparser/src/test/scala/com/github/sbt/avro/test/AvscParserSpec.scala @@ -1,4 +1,4 @@ -package sbtavro +package com.github.sbt.avro.test import java.io.File @@ -6,12 +6,12 @@ import org.apache.avro.Schema import org.apache.avro.generic.GenericData.StringType import org.specs2.mutable.Specification -import com.cavorite.test.avscparser.A +import com.github.sbt.avro.test.A class AvscParserSpec extends Specification { "A should have artifact property" >> { - A.getClassSchema().getProp("com.cavorite.sbt-avro.artifact") == "avscparser-test:avscparser-test:0.1.0-SNAPSHOT" + A.getClassSchema().getProp("com.github.sbt.sbt-avro.artifact") == "avscparser-test:avscparser-test:0.1.0-SNAPSHOT" } } diff --git a/src/sbt-test/sbt-avro/avscparser/test b/src/sbt-test/sbt-avro/avscparser/test index 5a71f24..3a30d85 100644 --- a/src/sbt-test/sbt-avro/avscparser/test +++ b/src/sbt-test/sbt-avro/avscparser/test @@ -1,7 +1,7 @@ > compile -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/test/avscparser/A.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/test/avscparser/B.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/A.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/B.java > test diff --git a/src/sbt-test/sbt-avro/basic_1.10/project/plugins.sbt b/src/sbt-test/sbt-avro/basic_1.10/project/plugins.sbt index ed0a543..023d1d6 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/project/plugins.sbt +++ b/src/sbt-test/sbt-avro/basic_1.10/project/plugins.sbt @@ -1,5 +1,5 @@ sys.props.get("plugin.version") match { - case Some(x) => addSbtPlugin("com.cavorite" % "sbt-avro" % x) + case Some(x) => addSbtPlugin("com.github.sbt" % "sbt-avro" % x) case _ => sys.error("""|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) } diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_a.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_a.avsc index 890bf3e..ea0ca3c 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_a.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_a.avsc @@ -1,6 +1,6 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "_A", "doc": "Top-level schema testing simple dependent schema names", "fields": [{ diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_b.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_b.avsc index c8a2179..d83f034 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_b.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_b.avsc @@ -1,6 +1,6 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "_B", "doc": "Simple dependency", "fields": [{ diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_c.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_c.avsc index c800586..56b9bb3 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_c.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_c.avsc @@ -1,6 +1,6 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "_C", "doc": "Simple dependency", "fields": [{ diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_d.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_d.avsc index 74b3108..b274b72 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_d.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_d.avsc @@ -1,6 +1,6 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "_D", "doc": "Simple dependency", "fields": [{ diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_e.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_e.avsc index d64eec5..e4aea35 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_e.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/_e.avsc @@ -1,6 +1,6 @@ { "type": "enum", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "_E", "doc": "Simple dependency", "symbols" : ["X", "XX", "XXX"] diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/a.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/a.avsc index a8c0e8d..c888a2f 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/a.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/a.avsc @@ -1,29 +1,29 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "A", "doc": "Top-level schema testing fully-qualified dependent schema names", "fields": [{ "doc": "fully-qualified dependent union field", "name": "b", - "type": ["null", "com.cavorite.B"] + "type": ["null", "com.github.sbt.avro.test.B"] },{ "doc": "fully-qualified dependent record field", "name": "c", - "type": "com.cavorite.C" + "type": "com.github.sbt.avro.test.C" },{ "doc": "fully-qualified dependent array field", "name": "d", "type": { "type": "array", - "items": "com.cavorite.D" + "items": "com.github.sbt.avro.test.D" } },{ "doc": "fully-qualified dependent enum field", "name": "e", "type": { "type": "array", - "items": "com.cavorite.E" + "items": "com.github.sbt.avro.test.E" } } ] diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/b.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/b.avsc index 5e272ae..47a8d92 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/b.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/b.avsc @@ -1,11 +1,11 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "B", "doc": "Fully-qualified dependency", "fields": [{ "name": "c", - "type": "com.cavorite.C" + "type": "com.github.sbt.avro.test.C" } ] } \ No newline at end of file diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/c.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/c.avsc index ccfeb11..1609cd6 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/c.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/c.avsc @@ -1,6 +1,6 @@ { "type": "record", - "name": "com.cavorite.C", + "name": "com.github.sbt.avro.test.C", "doc": "Fully-qualified dependency", "fields": [{ "name": "str", diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/d.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/d.avsc index f5f010d..850bb73 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/d.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/d.avsc @@ -1,10 +1,10 @@ { "type": "record", - "name": "com.cavorite.D", + "name": "com.github.sbt.avro.test.D", "doc": "Fully-qualified dependency", "fields": [{ "name": "c", - "type": "com.cavorite.C" + "type": "com.github.sbt.avro.test.C" } ] } \ No newline at end of file diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/e.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/e.avsc index 64f8c56..76a75b8 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/e.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/e.avsc @@ -1,6 +1,6 @@ { "type": "enum", "doc": "Fully-qualified dependency", - "name": "com.cavorite.E", + "name": "com.github.sbt.avro.test.E", "symbols" : ["A", "AA", "AAA"] } \ No newline at end of file diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/f.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/f.avsc index 7d68e21..20b534c 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/f.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/main/avro/f.avsc @@ -1,6 +1,6 @@ { "type": "record", - "name": "com.cavorite.F", + "name": "com.github.sbt.avro.test.F", "doc": "Wrong default for field", "fields": [ { diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/test/avro/x.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/test/avro/x.avsc index 12dfcc1..6fc9efc 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/test/avro/x.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/test/avro/x.avsc @@ -1,6 +1,6 @@ { "type": "record", - "name": "com.cavorite.X", + "name": "com.github.sbt.avro.test.X", "doc": "Fully-qualified dependency", "fields": [{ "name": "str", diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/test/avro/y.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/test/avro/y.avsc index 11e0faf..3e26e90 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/test/avro/y.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/test/avro/y.avsc @@ -1,11 +1,11 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "Y", "doc": "Fully-qualified dependency", "fields": [{ "name": "x", - "type": "com.cavorite.X" + "type": "com.github.sbt.avro.test.X" } ] } \ No newline at end of file diff --git a/src/sbt-test/sbt-avro/basic_1.10/src/test/avro/z.avsc b/src/sbt-test/sbt-avro/basic_1.10/src/test/avro/z.avsc index e954cce..37fc589 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/src/test/avro/z.avsc +++ b/src/sbt-test/sbt-avro/basic_1.10/src/test/avro/z.avsc @@ -1,6 +1,6 @@ { "type": "record", - "name": "com.cavorite.Z", + "name": "com.github.sbt.avro.test.Z", "doc": "Fully-qualified dependency", "fields": [{ "name": "str", diff --git a/src/sbt-test/sbt-avro/basic_1.10/test b/src/sbt-test/sbt-avro/basic_1.10/test index bab4010..01e33e9 100644 --- a/src/sbt-test/sbt-avro/basic_1.10/test +++ b/src/sbt-test/sbt-avro/basic_1.10/test @@ -1,42 +1,42 @@ -> set avroSchemaParserBuilder := sbtavro.DefaultSchemaParserBuilder.default().copy(validateDefaults = false) +> set avroSchemaParserBuilder := com.github.sbt.avro.DefaultSchemaParserBuilder.default().copy(validateDefaults = false) > avroGenerate -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/A.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/B.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/C.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/D.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/E.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/_A.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/_B.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/_C.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/_D.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/_E.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/A.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/B.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/C.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/D.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/E.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/_A.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/_B.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/_C.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/_D.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/_E.java > compile -$ exists target/scala-2.13/classes/com/cavorite/A.class -$ exists target/scala-2.13/classes/com/cavorite/B.class -$ exists target/scala-2.13/classes/com/cavorite/C.class -$ exists target/scala-2.13/classes/com/cavorite/D.class -$ exists target/scala-2.13/classes/com/cavorite/E.class -$ exists target/scala-2.13/classes/com/cavorite/_A.class -$ exists target/scala-2.13/classes/com/cavorite/_B.class -$ exists target/scala-2.13/classes/com/cavorite/_C.class -$ exists target/scala-2.13/classes/com/cavorite/_D.class -$ exists target/scala-2.13/classes/com/cavorite/_E.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/A.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/B.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/C.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/D.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/E.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/_A.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/_B.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/_C.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/_D.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/_E.class > test:compile -$ exists target/scala-2.13/src_managed/test/compiled_avro/com/cavorite/X.java -$ exists target/scala-2.13/src_managed/test/compiled_avro/com/cavorite/Y.java -$ exists target/scala-2.13/src_managed/test/compiled_avro/com/cavorite/Z.java -$ exists target/scala-2.13/test-classes/com/cavorite/X.class -$ exists target/scala-2.13/test-classes/com/cavorite/Y.class -$ exists target/scala-2.13/test-classes/com/cavorite/Z.class +$ exists target/scala-2.13/src_managed/test/compiled_avro/com/github/sbt/avro/test/X.java +$ exists target/scala-2.13/src_managed/test/compiled_avro/com/github/sbt/avro/test/Y.java +$ exists target/scala-2.13/src_managed/test/compiled_avro/com/github/sbt/avro/test/Z.java +$ exists target/scala-2.13/test-classes/com/github/sbt/avro/test/X.class +$ exists target/scala-2.13/test-classes/com/github/sbt/avro/test/Y.class +$ exists target/scala-2.13/test-classes/com/github/sbt/avro/test/Z.class > clean -> set avroSchemaParserBuilder := sbtavro.DefaultSchemaParserBuilder.default().copy(validateDefaults = true) +> set avroSchemaParserBuilder := com.github.sbt.avro.DefaultSchemaParserBuilder.default().copy(validateDefaults = true) # should fail because f.avsc has invalid default value -> avroGenerate diff --git a/src/sbt-test/sbt-avro/basic_1.8/project/plugins.sbt b/src/sbt-test/sbt-avro/basic_1.8/project/plugins.sbt index d4dd683..4f9a6c2 100644 --- a/src/sbt-test/sbt-avro/basic_1.8/project/plugins.sbt +++ b/src/sbt-test/sbt-avro/basic_1.8/project/plugins.sbt @@ -1,5 +1,5 @@ sys.props.get("plugin.version") match { - case Some(x) => addSbtPlugin("com.cavorite" % "sbt-avro" % x) + case Some(x) => addSbtPlugin("com.github.sbt" % "sbt-avro" % x) case _ => sys.error("""|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) } diff --git a/src/sbt-test/sbt-avro/basic_1.9/project/plugins.sbt b/src/sbt-test/sbt-avro/basic_1.9/project/plugins.sbt index ea8f54e..256ce10 100644 --- a/src/sbt-test/sbt-avro/basic_1.9/project/plugins.sbt +++ b/src/sbt-test/sbt-avro/basic_1.9/project/plugins.sbt @@ -1,5 +1,5 @@ sys.props.get("plugin.version") match { - case Some(x) => addSbtPlugin("com.cavorite" % "sbt-avro" % x) + case Some(x) => addSbtPlugin("com.github.sbt" % "sbt-avro" % x) case _ => sys.error("""|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) } diff --git a/src/sbt-test/sbt-avro/publishing/build.sbt b/src/sbt-test/sbt-avro/publishing/build.sbt index be45390..4e1ebc0 100644 --- a/src/sbt-test/sbt-avro/publishing/build.sbt +++ b/src/sbt-test/sbt-avro/publishing/build.sbt @@ -1,7 +1,7 @@ import sbt.Keys.scalaVersion lazy val commonSettings = Seq( - organization := "com.cavorite", + organization := "com.github.sbt", publishTo := Some(Opts.resolver.sonatypeReleases), scalaVersion := "2.13.6", libraryDependencies ++= Seq( @@ -28,7 +28,7 @@ lazy val `transitive`: Project = project version := "0.0.1-SNAPSHOT", Compile / packageAvro / publishArtifact := true, libraryDependencies ++= Seq( - "com.cavorite" % "external" % "0.0.1-SNAPSHOT" classifier "avro", + "com.github.sbt" % "external" % "0.0.1-SNAPSHOT" classifier "avro", ) ) @@ -41,7 +41,7 @@ lazy val root: Project = project // add avro jar to unpack its json avsc schema moduleFilter(organization = "org.apache.avro", name = "avro"), libraryDependencies ++= Seq( - "com.cavorite" %% "transitive" % "0.0.1-SNAPSHOT" classifier "avro", + "com.github.sbt" %% "transitive" % "0.0.1-SNAPSHOT" classifier "avro", "org.specs2" %% "specs2-core" % "4.12.3" % Test ) ) \ No newline at end of file diff --git a/src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/cavorite/external/avdl.avdl b/src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/github/sbt/avro/test/external/avdl.avdl similarity index 61% rename from src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/cavorite/external/avdl.avdl rename to src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/github/sbt/avro/test/external/avdl.avdl index fdb2870..a6b8de7 100644 --- a/src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/cavorite/external/avdl.avdl +++ b/src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/github/sbt/avro/test/external/avdl.avdl @@ -1,4 +1,4 @@ -@namespace("com.cavorite.external") +@namespace("com.github.sbt.avro.test.external") protocol ProtocolAvdl { record Avdl { string stringField; diff --git a/src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/cavorite/external/avpr.avpr b/src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/github/sbt/avro/test/external/avpr.avpr similarity index 84% rename from src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/cavorite/external/avpr.avpr rename to src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/github/sbt/avro/test/external/avpr.avpr index 170bd50..2d08ca9 100644 --- a/src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/cavorite/external/avpr.avpr +++ b/src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/github/sbt/avro/test/external/avpr.avpr @@ -1,5 +1,5 @@ { - "namespace": "com.cavorite.external", + "namespace": "com.github.sbt.avro.test.external", "protocol": "ProtocolAvpr", "types": [ { diff --git a/src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/cavorite/external/avsc.avsc b/src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/github/sbt/avro/test/external/avsc.avsc similarity index 73% rename from src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/cavorite/external/avsc.avsc rename to src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/github/sbt/avro/test/external/avsc.avsc index 96387ab..ba309c7 100644 --- a/src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/cavorite/external/avsc.avsc +++ b/src/sbt-test/sbt-avro/publishing/external/src/main/avro/com/github/sbt/avro/test/external/avsc.avsc @@ -1,6 +1,6 @@ { "name": "Avsc", - "namespace": "com.cavorite.external", + "namespace": "com.github.sbt.avro.test.external", "type": "record", "fields": [ { diff --git a/src/sbt-test/sbt-avro/publishing/project/plugins.sbt b/src/sbt-test/sbt-avro/publishing/project/plugins.sbt index ed0a543..023d1d6 100644 --- a/src/sbt-test/sbt-avro/publishing/project/plugins.sbt +++ b/src/sbt-test/sbt-avro/publishing/project/plugins.sbt @@ -1,5 +1,5 @@ sys.props.get("plugin.version") match { - case Some(x) => addSbtPlugin("com.cavorite" % "sbt-avro" % x) + case Some(x) => addSbtPlugin("com.github.sbt" % "sbt-avro" % x) case _ => sys.error("""|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) } diff --git a/src/sbt-test/sbt-avro/publishing/src/main/scala/com/cavorite/Main.scala b/src/sbt-test/sbt-avro/publishing/src/main/scala/com/github/sbt/avro/test/Main.scala similarity index 68% rename from src/sbt-test/sbt-avro/publishing/src/main/scala/com/cavorite/Main.scala rename to src/sbt-test/sbt-avro/publishing/src/main/scala/com/github/sbt/avro/test/Main.scala index df759cd..77ab838 100644 --- a/src/sbt-test/sbt-avro/publishing/src/main/scala/com/cavorite/Main.scala +++ b/src/sbt-test/sbt-avro/publishing/src/main/scala/com/github/sbt/avro/test/Main.scala @@ -1,5 +1,5 @@ -import com.cavorite.external -import com.cavorite.transitive +import com.github.sbt.avro.test.external +import com.github.sbt.avro.test.transitive object Main extends App { diff --git a/src/sbt-test/sbt-avro/publishing/test b/src/sbt-test/sbt-avro/publishing/test index 19a27bf..4daae2c 100644 --- a/src/sbt-test/sbt-avro/publishing/test +++ b/src/sbt-test/sbt-avro/publishing/test @@ -8,25 +8,25 @@ $ exists external/target/external-0.0.1-SNAPSHOT-avro.jar > avroUnpackDependencies -$ exists target/scala-2.13/src_managed/main/avro/com/cavorite/external/avdl.avdl -$ exists target/scala-2.13/src_managed/main/avro/com/cavorite/external/avpr.avpr -$ exists target/scala-2.13/src_managed/main/avro/com/cavorite/external/avsc.avsc -$ exists target/scala-2.13/src_managed/main/avro/com/cavorite/transitive/avsc.avsc +$ exists target/scala-2.13/src_managed/main/avro/com/github/sbt/avro/test/external/avdl.avdl +$ exists target/scala-2.13/src_managed/main/avro/com/github/sbt/avro/test/external/avpr.avpr +$ exists target/scala-2.13/src_managed/main/avro/com/github/sbt/avro/test/external/avsc.avsc +$ exists target/scala-2.13/src_managed/main/avro/com/github/sbt/avro/test/transitive/avsc.avsc $ exists target/scala-2.13/src_managed/main/avro/org/apache/avro/data/Json.avsc > avroGenerate -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/external/Avdl.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/external/Avpr.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/external/Avsc.java -$ exists target/scala-2.13/src_managed/main/compiled_avro/com/cavorite/transitive/Avsc.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/external/Avdl.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/external/Avpr.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/external/Avsc.java +$ exists target/scala-2.13/src_managed/main/compiled_avro/com/github/sbt/avro/test/transitive/Avsc.java > compile -$ exists target/scala-2.13/classes/com/cavorite/external/Avdl.class -$ exists target/scala-2.13/classes/com/cavorite/external/Avpr.class -$ exists target/scala-2.13/classes/com/cavorite/external/Avsc.class -$ exists target/scala-2.13/classes/com/cavorite/transitive/Avsc.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/external/Avdl.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/external/Avpr.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/external/Avsc.class +$ exists target/scala-2.13/classes/com/github/sbt/avro/test/transitive/Avsc.class > clean diff --git a/src/sbt-test/sbt-avro/publishing/transitive/src/main/avro/com/cavorite/transitive/avsc.avsc b/src/sbt-test/sbt-avro/publishing/transitive/src/main/avro/com/github/sbt/avro/test/transitive/avsc.avsc similarity index 61% rename from src/sbt-test/sbt-avro/publishing/transitive/src/main/avro/com/cavorite/transitive/avsc.avsc rename to src/sbt-test/sbt-avro/publishing/transitive/src/main/avro/com/github/sbt/avro/test/transitive/avsc.avsc index 1f2304c..d4d504e 100644 --- a/src/sbt-test/sbt-avro/publishing/transitive/src/main/avro/com/cavorite/transitive/avsc.avsc +++ b/src/sbt-test/sbt-avro/publishing/transitive/src/main/avro/com/github/sbt/avro/test/transitive/avsc.avsc @@ -1,6 +1,6 @@ { "name": "Avsc", - "namespace": "com.cavorite.transitive", + "namespace": "com.github.sbt.avro.test.transitive", "type": "record", "fields": [ { @@ -9,7 +9,7 @@ }, { "name": "referencedTypeField", - "type": "com.cavorite.external.Avsc" + "type": "com.github.sbt.avro.test.external.Avsc" } ] } \ No newline at end of file diff --git a/src/sbt-test/sbt-avro/sbt_1.2/project/plugins.sbt b/src/sbt-test/sbt-avro/sbt_1.2/project/plugins.sbt index ed0a543..023d1d6 100644 --- a/src/sbt-test/sbt-avro/sbt_1.2/project/plugins.sbt +++ b/src/sbt-test/sbt-avro/sbt_1.2/project/plugins.sbt @@ -1,5 +1,5 @@ sys.props.get("plugin.version") match { - case Some(x) => addSbtPlugin("com.cavorite" % "sbt-avro" % x) + case Some(x) => addSbtPlugin("com.github.sbt" % "sbt-avro" % x) case _ => sys.error("""|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) } diff --git a/src/sbt-test/sbt-avro/settings/project/plugins.sbt b/src/sbt-test/sbt-avro/settings/project/plugins.sbt index ed0a543..023d1d6 100644 --- a/src/sbt-test/sbt-avro/settings/project/plugins.sbt +++ b/src/sbt-test/sbt-avro/settings/project/plugins.sbt @@ -1,5 +1,5 @@ sys.props.get("plugin.version") match { - case Some(x) => addSbtPlugin("com.cavorite" % "sbt-avro" % x) + case Some(x) => addSbtPlugin("com.github.sbt" % "sbt-avro" % x) case _ => sys.error("""|The system property 'plugin.version' is not defined. |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) } diff --git a/src/sbt-test/sbt-avro/settings/src/main/avro_source/avdl.avdl b/src/sbt-test/sbt-avro/settings/src/main/avro_source/avdl.avdl index ac1686f..7785ee4 100644 --- a/src/sbt-test/sbt-avro/settings/src/main/avro_source/avdl.avdl +++ b/src/sbt-test/sbt-avro/settings/src/main/avro_source/avdl.avdl @@ -1,4 +1,4 @@ -@namespace("com.cavorite.test.settings") +@namespace("com.github.sbt.avro.test.settings") protocol ProtocolAvdl { record Avdl { union { null, string } stringField; diff --git a/src/sbt-test/sbt-avro/settings/src/main/avro_source/avpr.avpr b/src/sbt-test/sbt-avro/settings/src/main/avro_source/avpr.avpr index 9949858..ee621bc 100644 --- a/src/sbt-test/sbt-avro/settings/src/main/avro_source/avpr.avpr +++ b/src/sbt-test/sbt-avro/settings/src/main/avro_source/avpr.avpr @@ -1,5 +1,5 @@ { - "namespace": "com.cavorite.test.settings", + "namespace": "com.github.sbt.avro.test.settings", "protocol": "ProtocolAvpr", "types": [ { diff --git a/src/sbt-test/sbt-avro/settings/src/main/avro_source/avsc.avsc b/src/sbt-test/sbt-avro/settings/src/main/avro_source/avsc.avsc index 9b2c583..8722002 100644 --- a/src/sbt-test/sbt-avro/settings/src/main/avro_source/avsc.avsc +++ b/src/sbt-test/sbt-avro/settings/src/main/avro_source/avsc.avsc @@ -1,6 +1,6 @@ { "name": "Avsc", - "namespace": "com.cavorite.test.settings", + "namespace": "com.github.sbt.avro.test.settings", "type": "record", "fields": [ { diff --git a/src/sbt-test/sbt-avro/settings/src/test/scala/sbtavro/SettingsSpec.scala b/src/sbt-test/sbt-avro/settings/src/test/scala/com/github/sbt/avro/test/settings/SettingsSpec.scala similarity index 94% rename from src/sbt-test/sbt-avro/settings/src/test/scala/sbtavro/SettingsSpec.scala rename to src/sbt-test/sbt-avro/settings/src/test/scala/com/github/sbt/avro/test/settings/SettingsSpec.scala index 3148cbc..c086b14 100644 --- a/src/sbt-test/sbt-avro/settings/src/test/scala/sbtavro/SettingsSpec.scala +++ b/src/sbt-test/sbt-avro/settings/src/test/scala/com/github/sbt/avro/test/settings/SettingsSpec.scala @@ -1,4 +1,4 @@ -package sbtavro +package com.github.sbt.avro.test.settings import java.io.File import java.util.Optional @@ -6,7 +6,7 @@ import java.util.Optional import org.apache.avro.Schema import org.apache.avro.generic.GenericData.StringType import org.specs2.mutable.Specification -import com.cavorite.test.settings.{Avdl, Avpr, Avsc} +import com.github.sbt.avro.test.settings.{Avdl, Avpr, Avsc} class SettingsSpec extends Specification { diff --git a/src/sbt-test/sbt-avro/settings/test b/src/sbt-test/sbt-avro/settings/test index 18d2a43..3350d35 100644 --- a/src/sbt-test/sbt-avro/settings/test +++ b/src/sbt-test/sbt-avro/settings/test @@ -1,10 +1,10 @@ > compile -$ exists target/scala-2.13/src_managed/main/avro/com/cavorite/test/settings/Avdl.java -$ exists target/scala-2.13/src_managed/main/avro/com/cavorite/test/settings/Avpr.java -$ exists target/scala-2.13/src_managed/main/avro/com/cavorite/test/settings/ProtocolAvpr.java -$ exists target/scala-2.13/src_managed/main/avro/com/cavorite/test/settings/Avsc.java -$ exists target/scala-2.13/src_managed/main/avro/com/cavorite/test/settings/ProtocolAvdl.java +$ exists target/scala-2.13/src_managed/main/avro/com/github/sbt/avro/test/settings/Avdl.java +$ exists target/scala-2.13/src_managed/main/avro/com/github/sbt/avro/test/settings/Avpr.java +$ exists target/scala-2.13/src_managed/main/avro/com/github/sbt/avro/test/settings/ProtocolAvpr.java +$ exists target/scala-2.13/src_managed/main/avro/com/github/sbt/avro/test/settings/Avsc.java +$ exists target/scala-2.13/src_managed/main/avro/com/github/sbt/avro/test/settings/ProtocolAvdl.java > test diff --git a/src/test/resources/avro/_a.avsc b/src/test/resources/avro/_a.avsc index 890bf3e..ea0ca3c 100644 --- a/src/test/resources/avro/_a.avsc +++ b/src/test/resources/avro/_a.avsc @@ -1,6 +1,6 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "_A", "doc": "Top-level schema testing simple dependent schema names", "fields": [{ diff --git a/src/test/resources/avro/_b.avsc b/src/test/resources/avro/_b.avsc index c8a2179..d83f034 100644 --- a/src/test/resources/avro/_b.avsc +++ b/src/test/resources/avro/_b.avsc @@ -1,6 +1,6 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "_B", "doc": "Simple dependency", "fields": [{ diff --git a/src/test/resources/avro/_c.avsc b/src/test/resources/avro/_c.avsc index c800586..56b9bb3 100644 --- a/src/test/resources/avro/_c.avsc +++ b/src/test/resources/avro/_c.avsc @@ -1,6 +1,6 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "_C", "doc": "Simple dependency", "fields": [{ diff --git a/src/test/resources/avro/_d.avsc b/src/test/resources/avro/_d.avsc index 74b3108..b274b72 100644 --- a/src/test/resources/avro/_d.avsc +++ b/src/test/resources/avro/_d.avsc @@ -1,6 +1,6 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "_D", "doc": "Simple dependency", "fields": [{ diff --git a/src/test/resources/avro/_e.avsc b/src/test/resources/avro/_e.avsc index d64eec5..e4aea35 100644 --- a/src/test/resources/avro/_e.avsc +++ b/src/test/resources/avro/_e.avsc @@ -1,6 +1,6 @@ { "type": "enum", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "_E", "doc": "Simple dependency", "symbols" : ["X", "XX", "XXX"] diff --git a/src/test/resources/avro/a.avsc b/src/test/resources/avro/a.avsc index a8c0e8d..c888a2f 100644 --- a/src/test/resources/avro/a.avsc +++ b/src/test/resources/avro/a.avsc @@ -1,29 +1,29 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "A", "doc": "Top-level schema testing fully-qualified dependent schema names", "fields": [{ "doc": "fully-qualified dependent union field", "name": "b", - "type": ["null", "com.cavorite.B"] + "type": ["null", "com.github.sbt.avro.test.B"] },{ "doc": "fully-qualified dependent record field", "name": "c", - "type": "com.cavorite.C" + "type": "com.github.sbt.avro.test.C" },{ "doc": "fully-qualified dependent array field", "name": "d", "type": { "type": "array", - "items": "com.cavorite.D" + "items": "com.github.sbt.avro.test.D" } },{ "doc": "fully-qualified dependent enum field", "name": "e", "type": { "type": "array", - "items": "com.cavorite.E" + "items": "com.github.sbt.avro.test.E" } } ] diff --git a/src/test/resources/avro/b.avsc b/src/test/resources/avro/b.avsc index 5e272ae..47a8d92 100644 --- a/src/test/resources/avro/b.avsc +++ b/src/test/resources/avro/b.avsc @@ -1,11 +1,11 @@ { "type": "record", - "namespace": "com.cavorite", + "namespace": "com.github.sbt.avro.test", "name": "B", "doc": "Fully-qualified dependency", "fields": [{ "name": "c", - "type": "com.cavorite.C" + "type": "com.github.sbt.avro.test.C" } ] } \ No newline at end of file diff --git a/src/test/resources/avro/c.avsc b/src/test/resources/avro/c.avsc index ccfeb11..1609cd6 100644 --- a/src/test/resources/avro/c.avsc +++ b/src/test/resources/avro/c.avsc @@ -1,6 +1,6 @@ { "type": "record", - "name": "com.cavorite.C", + "name": "com.github.sbt.avro.test.C", "doc": "Fully-qualified dependency", "fields": [{ "name": "str", diff --git a/src/test/resources/avro/d.avsc b/src/test/resources/avro/d.avsc index f5f010d..850bb73 100644 --- a/src/test/resources/avro/d.avsc +++ b/src/test/resources/avro/d.avsc @@ -1,10 +1,10 @@ { "type": "record", - "name": "com.cavorite.D", + "name": "com.github.sbt.avro.test.D", "doc": "Fully-qualified dependency", "fields": [{ "name": "c", - "type": "com.cavorite.C" + "type": "com.github.sbt.avro.test.C" } ] } \ No newline at end of file diff --git a/src/test/resources/avro/e.avsc b/src/test/resources/avro/e.avsc index 64f8c56..76a75b8 100644 --- a/src/test/resources/avro/e.avsc +++ b/src/test/resources/avro/e.avsc @@ -1,6 +1,6 @@ { "type": "enum", "doc": "Fully-qualified dependency", - "name": "com.cavorite.E", + "name": "com.github.sbt.avro.test.E", "symbols" : ["A", "AA", "AAA"] } \ No newline at end of file diff --git a/src/test/scala/sbtavro/SbtAvroSpec.scala b/src/test/scala/com/github/sbt/avro/SbtAvroSpec.scala similarity index 95% rename from src/test/scala/sbtavro/SbtAvroSpec.scala rename to src/test/scala/com/github/sbt/avro/SbtAvroSpec.scala index b346f25..801da48 100644 --- a/src/test/scala/sbtavro/SbtAvroSpec.scala +++ b/src/test/scala/com/github/sbt/avro/SbtAvroSpec.scala @@ -1,8 +1,8 @@ -package sbtavro +package com.github.sbt.avro import java.io.File -import com.spotify.avro.mojo.AvroFileRef +import com.github.sbt.avro.mojo.AvroFileRef import org.apache.avro.compiler.specific.SpecificCompiler.FieldVisibility import org.apache.avro.generic.GenericData.StringType import org.specs2.mutable.Specification @@ -48,7 +48,7 @@ class SbtAvroSpec extends Specification { val sourceFiles = fullyQualifiedNames ++ simpleNames "It should be possible to compile types depending on others if source files are provided in right order" >> { - val packageDir = new File(targetDir, "com/cavorite") + val packageDir = new File(targetDir, "com/github/sbt/avro/test") val aJavaFile = new File(packageDir, "A.java") val bJavaFile = new File(packageDir, "B.java")