Change the directory structure to match our modules (#1451)

This commit is contained in:
Jesse Wilson
2021-12-08 23:52:51 -05:00
committed by GitHub
parent d5d172c3bb
commit 7578984f25
68 changed files with 24 additions and 265 deletions

View File

@@ -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.diffplug.gradle.spotless.JavaExtension
import com.vanniktech.maven.publish.MavenPublishBaseExtension import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.SonatypeHost import com.vanniktech.maven.publish.SonatypeHost

View File

@@ -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 { plugins {
kotlin("jvm") kotlin("jvm")
kotlin("kapt") kotlin("kapt")
} }
dependencies { dependencies {
kapt(project(":kotlin:moshi-kotlin-codegen")) kapt(project(":moshi-kotlin-codegen"))
compileOnly(libs.jsr305) compileOnly(libs.jsr305)
implementation(project(":moshi")) implementation(project(":moshi"))
implementation(project(":moshi-adapters")) implementation(project(":moshi-adapters"))

View File

@@ -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 # Memory for Dokka https://github.com/Kotlin/dokka/issues/1405
# --add-opens for GJF https://github.com/google/google-java-format#jdk-16 # --add-opens for GJF https://github.com/google/google-java-format#jdk-16
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 \ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 \

View File

@@ -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] [versions]
autoService = "1.0" autoService = "1.0"
gjf = "1.11.0" gjf = "1.11.0"

View File

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

View File

@@ -3,22 +3,6 @@ import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.MavenPublishBaseExtension import com.vanniktech.maven.publish.MavenPublishBaseExtension
import org.gradle.jvm.tasks.Jar 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 { plugins {
kotlin("jvm") kotlin("jvm")
id("com.vanniktech.maven.publish.base") id("com.vanniktech.maven.publish.base")

View File

@@ -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 import me.champeau.gradle.japicmp.JapicmpTask
plugins { plugins {

View File

@@ -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.tasks.ConfigureShadowRelocation
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
import com.vanniktech.maven.publish.JavadocJar.None import com.vanniktech.maven.publish.JavadocJar.None

View File

@@ -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.KAPT
import Build_gradle.TestMode.KSP import Build_gradle.TestMode.KSP
import Build_gradle.TestMode.REFLECT import Build_gradle.TestMode.REFLECT
@@ -69,15 +53,15 @@ dependencies {
// Do nothing // Do nothing
} }
KAPT -> { KAPT -> {
"kaptTest"(project(":kotlin:moshi-kotlin-codegen")) "kaptTest"(project(":moshi-kotlin-codegen"))
} }
KSP -> { KSP -> {
"kspTest"(project(":kotlin:moshi-kotlin-codegen")) "kspTest"(project(":moshi-kotlin-codegen"))
} }
} }
testImplementation(project(":moshi")) testImplementation(project(":moshi"))
testImplementation(project(":kotlin:moshi-kotlin")) testImplementation(project(":moshi-kotlin"))
testImplementation(project(":kotlin:tests:extra-moshi-test-module")) testImplementation(project(":moshi-kotlin-tests:extra-moshi-test-module"))
testImplementation(kotlin("reflect")) testImplementation(kotlin("reflect"))
testImplementation(libs.junit) testImplementation(libs.junit)
testImplementation(libs.assertj) testImplementation(libs.assertj)

View File

@@ -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.KAPT
import Build_gradle.TestMode.KSP import Build_gradle.TestMode.KSP
import Build_gradle.TestMode.REFLECT import Build_gradle.TestMode.REFLECT
@@ -68,18 +52,18 @@ dependencies {
when (testMode) { when (testMode) {
REFLECT -> { REFLECT -> {
// Default to KSP in this case, this is a CI-only thing // Default to KSP in this case, this is a CI-only thing
"kspTest"(project(":kotlin:moshi-kotlin-codegen")) "kspTest"(project(":moshi-kotlin-codegen"))
} }
KAPT -> { KAPT -> {
"kaptTest"(project(":kotlin:moshi-kotlin-codegen")) "kaptTest"(project(":moshi-kotlin-codegen"))
} }
KSP -> { KSP -> {
"kspTest"(project(":kotlin:moshi-kotlin-codegen")) "kspTest"(project(":moshi-kotlin-codegen"))
} }
} }
testImplementation(project(":moshi")) testImplementation(project(":moshi"))
testImplementation(project(":kotlin:moshi-kotlin")) testImplementation(project(":moshi-kotlin"))
testImplementation(project(":kotlin:tests:extra-moshi-test-module")) testImplementation(project(":moshi-kotlin-tests:extra-moshi-test-module"))
testImplementation(kotlin("reflect")) testImplementation(kotlin("reflect"))
testImplementation(libs.junit) testImplementation(libs.junit)
testImplementation(libs.assertj) testImplementation(libs.assertj)

View File

@@ -0,0 +1,7 @@
plugins {
kotlin("jvm")
}
dependencies {
implementation(project(":moshi"))
}

View File

@@ -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.JavadocJar.Javadoc
import com.vanniktech.maven.publish.KotlinJvm import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.MavenPublishBaseExtension import com.vanniktech.maven.publish.MavenPublishBaseExtension

View File

@@ -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.JavadocJar.Javadoc
import com.vanniktech.maven.publish.KotlinJvm import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.MavenPublishBaseExtension import com.vanniktech.maven.publish.MavenPublishBaseExtension

View File

@@ -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 import me.champeau.gradle.japicmp.JapicmpTask
plugins { plugins {

View File

@@ -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 { plugins {
`java-library` `java-library`
} }

View File

@@ -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 { pluginManagement {
repositories { repositories {
mavenCentral() mavenCentral()
@@ -25,16 +9,13 @@ rootProject.name = "moshi-root"
include(":moshi") include(":moshi")
include(":moshi:japicmp") include(":moshi:japicmp")
include(":moshi:records-tests") include(":moshi:records-tests")
include(":adapters") include(":moshi-adapters")
project(":adapters").name = "moshi-adapters" include(":moshi-adapters:japicmp")
include(":adapters:japicmp")
include(":examples") include(":examples")
include(":kotlin:reflect") include(":moshi-kotlin")
project(":kotlin:reflect").name = "moshi-kotlin" include(":moshi-kotlin-codegen")
include(":kotlin:codegen") include(":moshi-kotlin-tests")
project(":kotlin:codegen").name = "moshi-kotlin-codegen" include(":moshi-kotlin-tests:codegen-only")
include(":kotlin:tests") include(":moshi-kotlin-tests:extra-moshi-test-module")
include(":kotlin:tests:codegen-only")
include(":kotlin:tests:extra-moshi-test-module")
enableFeaturePreview("VERSION_CATALOGS") enableFeaturePreview("VERSION_CATALOGS")