diff --git a/build.gradle.kts b/build.gradle.kts index e4d1300..d0ff7d3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2020 Square, Inc. - * - * 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. - */ - import com.diffplug.gradle.spotless.JavaExtension import com.vanniktech.maven.publish.MavenPublishBaseExtension import com.vanniktech.maven.publish.SonatypeHost diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 7fe832c..e16487f 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -1,26 +1,10 @@ -/* - * Copyright (C) 2020 Square, Inc. - * - * 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. - */ - plugins { kotlin("jvm") kotlin("kapt") } dependencies { - kapt(project(":kotlin:moshi-kotlin-codegen")) + kapt(project(":moshi-kotlin-codegen")) compileOnly(libs.jsr305) implementation(project(":moshi")) implementation(project(":moshi-adapters")) diff --git a/gradle.properties b/gradle.properties index 695df8a..3dff311 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,19 +1,3 @@ -# -# Copyright (C) 2020 Square, Inc. -# -# 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. -# - # Memory for Dokka https://github.com/Kotlin/dokka/issues/1405 # --add-opens for GJF https://github.com/google/google-java-format#jdk-16 org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 \ diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2e248be..4ac32d2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,17 +1,3 @@ -# Copyright (C) 2021 Square, Inc. -# -# 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. - [versions] autoService = "1.0" gjf = "1.11.0" diff --git a/kotlin/tests/extra-moshi-test-module/build.gradle.kts b/kotlin/tests/extra-moshi-test-module/build.gradle.kts deleted file mode 100644 index a0b0305..0000000 --- a/kotlin/tests/extra-moshi-test-module/build.gradle.kts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2021 Square, Inc. - * - * 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. - */ - -plugins { - kotlin("jvm") -} - -dependencies { - implementation(project(":moshi")) -} diff --git a/adapters/README.md b/moshi-adapters/README.md similarity index 100% rename from adapters/README.md rename to moshi-adapters/README.md diff --git a/adapters/build.gradle.kts b/moshi-adapters/build.gradle.kts similarity index 53% rename from adapters/build.gradle.kts rename to moshi-adapters/build.gradle.kts index 13c8ede..5de3a2e 100644 --- a/adapters/build.gradle.kts +++ b/moshi-adapters/build.gradle.kts @@ -3,22 +3,6 @@ import com.vanniktech.maven.publish.KotlinJvm import com.vanniktech.maven.publish.MavenPublishBaseExtension import org.gradle.jvm.tasks.Jar -/* - * Copyright (C) 2020 Square, Inc. - * - * 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. - */ - plugins { kotlin("jvm") id("com.vanniktech.maven.publish.base") diff --git a/adapters/japicmp/build.gradle.kts b/moshi-adapters/japicmp/build.gradle.kts similarity index 55% rename from adapters/japicmp/build.gradle.kts rename to moshi-adapters/japicmp/build.gradle.kts index 298ec39..ceec76e 100644 --- a/adapters/japicmp/build.gradle.kts +++ b/moshi-adapters/japicmp/build.gradle.kts @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2020 Square, Inc. - * - * 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. - */ - import me.champeau.gradle.japicmp.JapicmpTask plugins { diff --git a/adapters/src/main/java/com/squareup/moshi/Rfc3339DateJsonAdapter.java b/moshi-adapters/src/main/java/com/squareup/moshi/Rfc3339DateJsonAdapter.java similarity index 100% rename from adapters/src/main/java/com/squareup/moshi/Rfc3339DateJsonAdapter.java rename to moshi-adapters/src/main/java/com/squareup/moshi/Rfc3339DateJsonAdapter.java diff --git a/adapters/src/main/java/com/squareup/moshi/adapters/EnumJsonAdapter.java b/moshi-adapters/src/main/java/com/squareup/moshi/adapters/EnumJsonAdapter.java similarity index 100% rename from adapters/src/main/java/com/squareup/moshi/adapters/EnumJsonAdapter.java rename to moshi-adapters/src/main/java/com/squareup/moshi/adapters/EnumJsonAdapter.java diff --git a/adapters/src/main/java/com/squareup/moshi/adapters/Iso8601Utils.java b/moshi-adapters/src/main/java/com/squareup/moshi/adapters/Iso8601Utils.java similarity index 100% rename from adapters/src/main/java/com/squareup/moshi/adapters/Iso8601Utils.java rename to moshi-adapters/src/main/java/com/squareup/moshi/adapters/Iso8601Utils.java diff --git a/adapters/src/main/java/com/squareup/moshi/adapters/PolymorphicJsonAdapterFactory.java b/moshi-adapters/src/main/java/com/squareup/moshi/adapters/PolymorphicJsonAdapterFactory.java similarity index 100% rename from adapters/src/main/java/com/squareup/moshi/adapters/PolymorphicJsonAdapterFactory.java rename to moshi-adapters/src/main/java/com/squareup/moshi/adapters/PolymorphicJsonAdapterFactory.java diff --git a/adapters/src/main/java/com/squareup/moshi/adapters/Rfc3339DateJsonAdapter.java b/moshi-adapters/src/main/java/com/squareup/moshi/adapters/Rfc3339DateJsonAdapter.java similarity index 100% rename from adapters/src/main/java/com/squareup/moshi/adapters/Rfc3339DateJsonAdapter.java rename to moshi-adapters/src/main/java/com/squareup/moshi/adapters/Rfc3339DateJsonAdapter.java diff --git a/adapters/src/test/java/com/squareup/moshi/adapters/EnumJsonAdapterTest.java b/moshi-adapters/src/test/java/com/squareup/moshi/adapters/EnumJsonAdapterTest.java similarity index 100% rename from adapters/src/test/java/com/squareup/moshi/adapters/EnumJsonAdapterTest.java rename to moshi-adapters/src/test/java/com/squareup/moshi/adapters/EnumJsonAdapterTest.java diff --git a/adapters/src/test/java/com/squareup/moshi/adapters/PolymorphicJsonAdapterFactoryTest.java b/moshi-adapters/src/test/java/com/squareup/moshi/adapters/PolymorphicJsonAdapterFactoryTest.java similarity index 100% rename from adapters/src/test/java/com/squareup/moshi/adapters/PolymorphicJsonAdapterFactoryTest.java rename to moshi-adapters/src/test/java/com/squareup/moshi/adapters/PolymorphicJsonAdapterFactoryTest.java diff --git a/adapters/src/test/java/com/squareup/moshi/adapters/Rfc3339DateJsonAdapterTest.java b/moshi-adapters/src/test/java/com/squareup/moshi/adapters/Rfc3339DateJsonAdapterTest.java similarity index 100% rename from adapters/src/test/java/com/squareup/moshi/adapters/Rfc3339DateJsonAdapterTest.java rename to moshi-adapters/src/test/java/com/squareup/moshi/adapters/Rfc3339DateJsonAdapterTest.java diff --git a/kotlin/codegen/build.gradle.kts b/moshi-kotlin-codegen/build.gradle.kts similarity index 87% rename from kotlin/codegen/build.gradle.kts rename to moshi-kotlin-codegen/build.gradle.kts index d0fc648..bd00581 100644 --- a/kotlin/codegen/build.gradle.kts +++ b/moshi-kotlin-codegen/build.gradle.kts @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2020 Square, Inc. - * - * 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. - */ - import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer import com.vanniktech.maven.publish.JavadocJar.None diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/AdapterGenerator.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/AdapterGenerator.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/AdapterGenerator.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/AdapterGenerator.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/DelegateKey.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/DelegateKey.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/DelegateKey.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/DelegateKey.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/InternalMoshiCodegenApi.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/InternalMoshiCodegenApi.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/InternalMoshiCodegenApi.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/InternalMoshiCodegenApi.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/Options.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/Options.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/Options.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/Options.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/ProguardRules.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/ProguardRules.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/ProguardRules.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/ProguardRules.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/PropertyGenerator.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/PropertyGenerator.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/PropertyGenerator.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/PropertyGenerator.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetConstructor.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetConstructor.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetConstructor.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetConstructor.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetParameter.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetParameter.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetParameter.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetParameter.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetProperty.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetProperty.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetProperty.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetProperty.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetType.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetType.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetType.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TargetType.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TypeRenderer.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TypeRenderer.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TypeRenderer.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/TypeRenderer.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/kotlintypes.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/kotlintypes.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/kotlintypes.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/kotlintypes.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/typeAliasUnwrapping.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/typeAliasUnwrapping.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/typeAliasUnwrapping.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/api/typeAliasUnwrapping.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/AppliedType.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/AppliedType.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/AppliedType.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/AppliedType.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/JsonClassCodegenProcessor.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/JsonClassCodegenProcessor.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/JsonClassCodegenProcessor.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/JsonClassCodegenProcessor.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/MoshiCachedClassInspector.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/MoshiCachedClassInspector.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/MoshiCachedClassInspector.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/MoshiCachedClassInspector.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/metadata.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/metadata.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/metadata.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/apt/metadata.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/AppliedType.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/AppliedType.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/AppliedType.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/AppliedType.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/JsonClassSymbolProcessorProvider.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/JsonClassSymbolProcessorProvider.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/JsonClassSymbolProcessorProvider.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/JsonClassSymbolProcessorProvider.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/KspUtil.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/KspUtil.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/KspUtil.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/KspUtil.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/MoshiApiUtil.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/MoshiApiUtil.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/MoshiApiUtil.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/MoshiApiUtil.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/TargetTypes.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/TargetTypes.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/TargetTypes.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/TargetTypes.kt diff --git a/kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/shadedUtil.kt b/moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/shadedUtil.kt similarity index 100% rename from kotlin/codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/shadedUtil.kt rename to moshi-kotlin-codegen/src/main/java/com/squareup/moshi/kotlin/codegen/ksp/shadedUtil.kt diff --git a/kotlin/codegen/src/main/resources/META-INF/gradle/incremental.annotation.processors b/moshi-kotlin-codegen/src/main/resources/META-INF/gradle/incremental.annotation.processors similarity index 100% rename from kotlin/codegen/src/main/resources/META-INF/gradle/incremental.annotation.processors rename to moshi-kotlin-codegen/src/main/resources/META-INF/gradle/incremental.annotation.processors diff --git a/kotlin/codegen/src/test/java/com/squareup/moshi/kotlin/codegen/JavaSuperclass.java b/moshi-kotlin-codegen/src/test/java/com/squareup/moshi/kotlin/codegen/JavaSuperclass.java similarity index 100% rename from kotlin/codegen/src/test/java/com/squareup/moshi/kotlin/codegen/JavaSuperclass.java rename to moshi-kotlin-codegen/src/test/java/com/squareup/moshi/kotlin/codegen/JavaSuperclass.java diff --git a/kotlin/codegen/src/test/java/com/squareup/moshi/kotlin/codegen/apt/JsonClassCodegenProcessorTest.kt b/moshi-kotlin-codegen/src/test/java/com/squareup/moshi/kotlin/codegen/apt/JsonClassCodegenProcessorTest.kt similarity index 100% rename from kotlin/codegen/src/test/java/com/squareup/moshi/kotlin/codegen/apt/JsonClassCodegenProcessorTest.kt rename to moshi-kotlin-codegen/src/test/java/com/squareup/moshi/kotlin/codegen/apt/JsonClassCodegenProcessorTest.kt diff --git a/kotlin/codegen/src/test/java/com/squareup/moshi/kotlin/codegen/ksp/JsonClassSymbolProcessorTest.kt b/moshi-kotlin-codegen/src/test/java/com/squareup/moshi/kotlin/codegen/ksp/JsonClassSymbolProcessorTest.kt similarity index 100% rename from kotlin/codegen/src/test/java/com/squareup/moshi/kotlin/codegen/ksp/JsonClassSymbolProcessorTest.kt rename to moshi-kotlin-codegen/src/test/java/com/squareup/moshi/kotlin/codegen/ksp/JsonClassSymbolProcessorTest.kt diff --git a/kotlin/tests/build.gradle.kts b/moshi-kotlin-tests/build.gradle.kts similarity index 63% rename from kotlin/tests/build.gradle.kts rename to moshi-kotlin-tests/build.gradle.kts index d52844f..beee302 100644 --- a/kotlin/tests/build.gradle.kts +++ b/moshi-kotlin-tests/build.gradle.kts @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2020 Square, Inc. - * - * 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. - */ - import Build_gradle.TestMode.KAPT import Build_gradle.TestMode.KSP import Build_gradle.TestMode.REFLECT @@ -69,15 +53,15 @@ dependencies { // Do nothing } KAPT -> { - "kaptTest"(project(":kotlin:moshi-kotlin-codegen")) + "kaptTest"(project(":moshi-kotlin-codegen")) } KSP -> { - "kspTest"(project(":kotlin:moshi-kotlin-codegen")) + "kspTest"(project(":moshi-kotlin-codegen")) } } testImplementation(project(":moshi")) - testImplementation(project(":kotlin:moshi-kotlin")) - testImplementation(project(":kotlin:tests:extra-moshi-test-module")) + testImplementation(project(":moshi-kotlin")) + testImplementation(project(":moshi-kotlin-tests:extra-moshi-test-module")) testImplementation(kotlin("reflect")) testImplementation(libs.junit) testImplementation(libs.assertj) diff --git a/kotlin/tests/codegen-only/build.gradle.kts b/moshi-kotlin-tests/codegen-only/build.gradle.kts similarity index 63% rename from kotlin/tests/codegen-only/build.gradle.kts rename to moshi-kotlin-tests/codegen-only/build.gradle.kts index 940935e..2e6a82f 100644 --- a/kotlin/tests/codegen-only/build.gradle.kts +++ b/moshi-kotlin-tests/codegen-only/build.gradle.kts @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2021 Square, Inc. - * - * 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. - */ - import Build_gradle.TestMode.KAPT import Build_gradle.TestMode.KSP import Build_gradle.TestMode.REFLECT @@ -68,18 +52,18 @@ dependencies { when (testMode) { REFLECT -> { // Default to KSP in this case, this is a CI-only thing - "kspTest"(project(":kotlin:moshi-kotlin-codegen")) + "kspTest"(project(":moshi-kotlin-codegen")) } KAPT -> { - "kaptTest"(project(":kotlin:moshi-kotlin-codegen")) + "kaptTest"(project(":moshi-kotlin-codegen")) } KSP -> { - "kspTest"(project(":kotlin:moshi-kotlin-codegen")) + "kspTest"(project(":moshi-kotlin-codegen")) } } testImplementation(project(":moshi")) - testImplementation(project(":kotlin:moshi-kotlin")) - testImplementation(project(":kotlin:tests:extra-moshi-test-module")) + testImplementation(project(":moshi-kotlin")) + testImplementation(project(":moshi-kotlin-tests:extra-moshi-test-module")) testImplementation(kotlin("reflect")) testImplementation(libs.junit) testImplementation(libs.assertj) diff --git a/kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/CompileOnlyTests.kt b/moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/CompileOnlyTests.kt similarity index 100% rename from kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/CompileOnlyTests.kt rename to moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/CompileOnlyTests.kt diff --git a/kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/ComplexGenericsInheritanceTest.kt b/moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/ComplexGenericsInheritanceTest.kt similarity index 100% rename from kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/ComplexGenericsInheritanceTest.kt rename to moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/ComplexGenericsInheritanceTest.kt diff --git a/kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/DefaultConstructorTest.kt b/moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/DefaultConstructorTest.kt similarity index 100% rename from kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/DefaultConstructorTest.kt rename to moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/DefaultConstructorTest.kt diff --git a/kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/GeneratedAdaptersTest.kt b/moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/GeneratedAdaptersTest.kt similarity index 100% rename from kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/GeneratedAdaptersTest.kt rename to moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/GeneratedAdaptersTest.kt diff --git a/kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/GeneratedAdaptersTest_CustomGeneratedClassJsonAdapter.kt b/moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/GeneratedAdaptersTest_CustomGeneratedClassJsonAdapter.kt similarity index 100% rename from kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/GeneratedAdaptersTest_CustomGeneratedClassJsonAdapter.kt rename to moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/GeneratedAdaptersTest_CustomGeneratedClassJsonAdapter.kt diff --git a/kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/LooksLikeAClass/ClassInPackageThatLooksLikeAClass.kt b/moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/LooksLikeAClass/ClassInPackageThatLooksLikeAClass.kt similarity index 100% rename from kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/LooksLikeAClass/ClassInPackageThatLooksLikeAClass.kt rename to moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/LooksLikeAClass/ClassInPackageThatLooksLikeAClass.kt diff --git a/kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/MixingReflectAndCodeGen.kt b/moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/MixingReflectAndCodeGen.kt similarity index 100% rename from kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/MixingReflectAndCodeGen.kt rename to moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/MixingReflectAndCodeGen.kt diff --git a/kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/MoshiKspTest.kt b/moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/MoshiKspTest.kt similarity index 100% rename from kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/MoshiKspTest.kt rename to moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/MoshiKspTest.kt diff --git a/kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/MultipleMasksTest.kt b/moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/MultipleMasksTest.kt similarity index 100% rename from kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/MultipleMasksTest.kt rename to moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/MultipleMasksTest.kt diff --git a/kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/annotation/UppercaseInAnnotationPackage.kt b/moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/annotation/UppercaseInAnnotationPackage.kt similarity index 100% rename from kotlin/tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/annotation/UppercaseInAnnotationPackage.kt rename to moshi-kotlin-tests/codegen-only/src/test/kotlin/com/squareup/moshi/kotlin/codegen/annotation/UppercaseInAnnotationPackage.kt diff --git a/moshi-kotlin-tests/extra-moshi-test-module/build.gradle.kts b/moshi-kotlin-tests/extra-moshi-test-module/build.gradle.kts new file mode 100644 index 0000000..41c14a0 --- /dev/null +++ b/moshi-kotlin-tests/extra-moshi-test-module/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + kotlin("jvm") +} + +dependencies { + implementation(project(":moshi")) +} diff --git a/kotlin/tests/extra-moshi-test-module/src/main/kotlin/com/squareup/moshi/kotlin/codegen/test/extra/AbstractClassInModuleA.kt b/moshi-kotlin-tests/extra-moshi-test-module/src/main/kotlin/com/squareup/moshi/kotlin/codegen/test/extra/AbstractClassInModuleA.kt similarity index 100% rename from kotlin/tests/extra-moshi-test-module/src/main/kotlin/com/squareup/moshi/kotlin/codegen/test/extra/AbstractClassInModuleA.kt rename to moshi-kotlin-tests/extra-moshi-test-module/src/main/kotlin/com/squareup/moshi/kotlin/codegen/test/extra/AbstractClassInModuleA.kt diff --git a/kotlin/tests/src/test/kotlin/com/squareup/moshi/kotlin/DualKotlinTest.kt b/moshi-kotlin-tests/src/test/kotlin/com/squareup/moshi/kotlin/DualKotlinTest.kt similarity index 100% rename from kotlin/tests/src/test/kotlin/com/squareup/moshi/kotlin/DualKotlinTest.kt rename to moshi-kotlin-tests/src/test/kotlin/com/squareup/moshi/kotlin/DualKotlinTest.kt diff --git a/kotlin/tests/src/test/kotlin/com/squareup/moshi/kotlin/reflect/KotlinJsonAdapterTest.kt b/moshi-kotlin-tests/src/test/kotlin/com/squareup/moshi/kotlin/reflect/KotlinJsonAdapterTest.kt similarity index 100% rename from kotlin/tests/src/test/kotlin/com/squareup/moshi/kotlin/reflect/KotlinJsonAdapterTest.kt rename to moshi-kotlin-tests/src/test/kotlin/com/squareup/moshi/kotlin/reflect/KotlinJsonAdapterTest.kt diff --git a/kotlin/reflect/build.gradle.kts b/moshi-kotlin/build.gradle.kts similarity index 53% rename from kotlin/reflect/build.gradle.kts rename to moshi-kotlin/build.gradle.kts index 77c19cf..c9aeb0a 100644 --- a/kotlin/reflect/build.gradle.kts +++ b/moshi-kotlin/build.gradle.kts @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2020 Square, Inc. - * - * 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. - */ - import com.vanniktech.maven.publish.JavadocJar.Javadoc import com.vanniktech.maven.publish.KotlinJvm import com.vanniktech.maven.publish.MavenPublishBaseExtension diff --git a/kotlin/reflect/src/main/java/com/squareup/moshi/KotlinJsonAdapter.kt b/moshi-kotlin/src/main/java/com/squareup/moshi/KotlinJsonAdapter.kt similarity index 100% rename from kotlin/reflect/src/main/java/com/squareup/moshi/KotlinJsonAdapter.kt rename to moshi-kotlin/src/main/java/com/squareup/moshi/KotlinJsonAdapter.kt diff --git a/kotlin/reflect/src/main/java/com/squareup/moshi/kotlin/reflect/KotlinJsonAdapter.kt b/moshi-kotlin/src/main/java/com/squareup/moshi/kotlin/reflect/KotlinJsonAdapter.kt similarity index 100% rename from kotlin/reflect/src/main/java/com/squareup/moshi/kotlin/reflect/KotlinJsonAdapter.kt rename to moshi-kotlin/src/main/java/com/squareup/moshi/kotlin/reflect/KotlinJsonAdapter.kt diff --git a/kotlin/reflect/src/test/java/com/squareup/moshi/kotlin/reflect/KotlinJsonAdapterTest.kt b/moshi-kotlin/src/test/java/com/squareup/moshi/kotlin/reflect/KotlinJsonAdapterTest.kt similarity index 100% rename from kotlin/reflect/src/test/java/com/squareup/moshi/kotlin/reflect/KotlinJsonAdapterTest.kt rename to moshi-kotlin/src/test/java/com/squareup/moshi/kotlin/reflect/KotlinJsonAdapterTest.kt diff --git a/moshi/build.gradle.kts b/moshi/build.gradle.kts index 75a3e3a..f82d45d 100644 --- a/moshi/build.gradle.kts +++ b/moshi/build.gradle.kts @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2020 Square, Inc. - * - * 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. - */ - import com.vanniktech.maven.publish.JavadocJar.Javadoc import com.vanniktech.maven.publish.KotlinJvm import com.vanniktech.maven.publish.MavenPublishBaseExtension diff --git a/moshi/japicmp/build.gradle.kts b/moshi/japicmp/build.gradle.kts index 49b2a61..ca47d11 100644 --- a/moshi/japicmp/build.gradle.kts +++ b/moshi/japicmp/build.gradle.kts @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2020 Square, Inc. - * - * 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. - */ - import me.champeau.gradle.japicmp.JapicmpTask plugins { diff --git a/moshi/records-tests/build.gradle.kts b/moshi/records-tests/build.gradle.kts index e60e4a2..6d3b1bf 100644 --- a/moshi/records-tests/build.gradle.kts +++ b/moshi/records-tests/build.gradle.kts @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2021 Square, Inc. - * - * 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. - */ - plugins { `java-library` } diff --git a/settings.gradle.kts b/settings.gradle.kts index 64d43d3..0dde31a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2020 Square, Inc. - * - * 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. - */ - pluginManagement { repositories { mavenCentral() @@ -25,16 +9,13 @@ rootProject.name = "moshi-root" include(":moshi") include(":moshi:japicmp") include(":moshi:records-tests") -include(":adapters") -project(":adapters").name = "moshi-adapters" -include(":adapters:japicmp") +include(":moshi-adapters") +include(":moshi-adapters:japicmp") include(":examples") -include(":kotlin:reflect") -project(":kotlin:reflect").name = "moshi-kotlin" -include(":kotlin:codegen") -project(":kotlin:codegen").name = "moshi-kotlin-codegen" -include(":kotlin:tests") -include(":kotlin:tests:codegen-only") -include(":kotlin:tests:extra-moshi-test-module") +include(":moshi-kotlin") +include(":moshi-kotlin-codegen") +include(":moshi-kotlin-tests") +include(":moshi-kotlin-tests:codegen-only") +include(":moshi-kotlin-tests:extra-moshi-test-module") enableFeaturePreview("VERSION_CATALOGS")