-
Notifications
You must be signed in to change notification settings - Fork 768
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Start gradle root * Clean up test API ambiguities These don't compile in gradle anymore and the team[] warns * Exclude .gradle dirs in git * Set up moshi module * Set up moshi-adapters * Add repositories to subprojects * Set target/source compatibility * Set up examples * Fix location of reflect/test dir * Set up moshi-kotlin * Set up code gen * Opportunistic update code gen deps * Fix up with code gen * Set up kotlin tests * Update snapshots * Update travis build * Configure checkstyle * Cache gradle * Finish fixing up checkstyle * Now disable checkstyle until we can fix them all :| * Update contributing * Fix tests in codegen * Remove unnecessary annotation * Remove maven stuff! * Suppress warning * Remove jcenter * Consolidate dependencies * Revert "Clean up test API ambiguities" This reverts commit 3ead69b. * Fix incap dep * Opportunistically fix some small kotlinpoet deprecations * Automatically apply the stdlib to all kotlin projects * Opportunistic move to opt-in and remove unnecessary annotations The kotlin maven plugin didn't handle these well in the IDE, gradle does * Fix Type doc warning * Fix okio version * Fix dokka support * Fix copypasta * Use new snapshot * Kotlin 1.4.0
- Loading branch information
Showing
48 changed files
with
899 additions
and
1,643 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,5 @@ classes | |
obj | ||
|
||
.DS_Store | ||
|
||
.gradle |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* 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 { | ||
`java-library` | ||
id("com.vanniktech.maven.publish") | ||
} | ||
|
||
dependencies { | ||
compileOnly(Dependencies.jsr305) | ||
api(project(":moshi")) | ||
|
||
testCompileOnly(Dependencies.jsr305) | ||
testImplementation(Dependencies.Testing.junit) | ||
testImplementation(Dependencies.Testing.assertj) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
POM_NAME=Moshi Adapters | ||
POM_ARTIFACT_ID=moshi-adapters | ||
POM_PACKAGING=jar | ||
AUTOMATIC_MODULE_NAME=com.squareup.moshi.adapters |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/* | ||
* 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.MavenPublishPluginExtension | ||
import org.gradle.jvm.tasks.Jar | ||
|
||
buildscript { | ||
dependencies { | ||
classpath(kotlin("gradle-plugin", version = Dependencies.Kotlin.version)) | ||
} | ||
} | ||
|
||
plugins { | ||
id("com.vanniktech.maven.publish") version "0.11.1" apply false | ||
id("org.jetbrains.dokka") version "0.10.1" apply false | ||
} | ||
|
||
subprojects { | ||
repositories { | ||
mavenCentral() | ||
@Suppress("UnstableApiUsage") | ||
exclusiveContent { | ||
forRepository { | ||
maven { | ||
name = "JCenter" | ||
setUrl("https://jcenter.bintray.com/") | ||
} | ||
} | ||
filter { | ||
includeModule("org.jetbrains.dokka", "dokka-fatjar") | ||
} | ||
} | ||
} | ||
|
||
// apply(plugin = "checkstyle") | ||
// configure<CheckstyleExtension> { | ||
// toolVersion = "8.28" | ||
// configFile = rootProject.file("checkstyle.xml") | ||
// } | ||
// tasks.withType<Checkstyle>().configureEach { | ||
// exclude("**/Iso8601Utils.java") | ||
// } | ||
|
||
pluginManager.withPlugin("java-library") { | ||
configure<JavaPluginExtension> { | ||
sourceCompatibility = JavaVersion.VERSION_1_7 | ||
targetCompatibility = JavaVersion.VERSION_1_7 | ||
} | ||
} | ||
|
||
// Configure publishing | ||
pluginManager.withPlugin("com.vanniktech.maven.publish") { | ||
configure<MavenPublishPluginExtension> { | ||
useLegacyMode = false | ||
nexus { | ||
groupId = "com.squareup" | ||
} | ||
} | ||
|
||
// Configure automatic-module-name, but only for published modules | ||
@Suppress("UnstableApiUsage") | ||
val automaticModuleName = providers.gradleProperty("AUTOMATIC_MODULE_NAME") | ||
.forUseAtConfigurationTime() | ||
if (automaticModuleName.isPresent) { | ||
val name = automaticModuleName.get() | ||
tasks.withType<Jar>().configureEach { | ||
manifest { | ||
attributes("Automatic-Module-Name" to name) | ||
} | ||
} | ||
} | ||
} | ||
|
||
pluginManager.withPlugin("org.jetbrains.kotlin.jvm") { | ||
dependencies.add("api", Dependencies.Kotlin.stdlib) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* 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-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} |
Oops, something went wrong.
4dd4a9d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍