mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 07:59:21 +08:00
Migrate to Gradle (#1159)
* 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 3ead69b844b5d7f66134b721e95581f5df1cccd6. * 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
This commit is contained in:
23
buildSrc/build.gradle.kts
Normal file
23
buildSrc/build.gradle.kts
Normal file
@@ -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()
|
||||
}
|
56
buildSrc/src/main/kotlin/Dependencies.kt
Normal file
56
buildSrc/src/main/kotlin/Dependencies.kt
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
object Dependencies {
|
||||
|
||||
const val asm = "org.ow2.asm:asm:7.1"
|
||||
const val jsr305 = "com.google.code.findbugs:jsr305:3.0.2"
|
||||
const val okio = "com.squareup.okio:okio:1.16.0"
|
||||
const val okio2 = "com.squareup.okio:okio:2.1.0"
|
||||
|
||||
object AutoService {
|
||||
private const val version = "1.0-rc7"
|
||||
const val annotations = "com.google.auto.service:auto-service-annotations:$version"
|
||||
const val processor = "com.google.auto.service:auto-service:$version"
|
||||
}
|
||||
|
||||
object Incap {
|
||||
private const val version = "0.3"
|
||||
const val annotations = "net.ltgt.gradle.incap:incap:$version"
|
||||
const val processor = "net.ltgt.gradle.incap:incap-processor:$version"
|
||||
}
|
||||
|
||||
object Kotlin {
|
||||
const val version = "1.4.0"
|
||||
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib:$version"
|
||||
const val metadata = "org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.1.0"
|
||||
}
|
||||
|
||||
object KotlinPoet {
|
||||
private const val version = "1.6.0"
|
||||
const val kotlinPoet = "com.squareup:kotlinpoet:$version"
|
||||
const val metadata = "com.squareup:kotlinpoet-metadata-specs:$version"
|
||||
const val metadataSpecs = "com.squareup:kotlinpoet-metadata-specs:$version"
|
||||
const val elementsClassInspector = "com.squareup:kotlinpoet-classinspector-elements:$version"
|
||||
}
|
||||
|
||||
object Testing {
|
||||
const val assertj = "org.assertj:assertj-core:3.11.1"
|
||||
const val compileTesting = "com.github.tschuchortdev:kotlin-compile-testing:1.2.8"
|
||||
const val junit = "junit:junit:4.12"
|
||||
const val truth = "com.google.truth:truth:1.0"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user