diff --git a/build.gradle.kts b/build.gradle.kts index e07e0ea..d38f34e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -48,63 +48,26 @@ spotless { indentWithSpaces(2) endWithNewline() } - val externalJavaFiles = arrayOf( - "**/ClassFactory.java", - "**/Iso8601Utils.java", - "**/JsonReader.java", - "**/JsonReaderPathTest.java", - "**/JsonReaderTest.java", - "**/JsonScope.java", - "**/JsonUtf8Reader.java", - "**/JsonUtf8ReaderPathTest.java", - "**/JsonUtf8ReaderTest.java", - "**/JsonUtf8ReaderTest.java", - "**/JsonUtf8Writer.java", - "**/JsonUtf8WriterTest.java", - "**/JsonWriter.java", - "**/JsonWriterPathTest.java", - "**/JsonWriterTest.java", - "**/LinkedHashTreeMap.java", - "**/LinkedHashTreeMapTest.java", - "**/PolymorphicJsonAdapterFactory.java", - "**/RecursiveTypesResolveTest.java", - "**/Types.java", - "**/TypesTest.java" - ) val configureCommonJavaFormat: JavaExtension.() -> Unit = { googleJavaFormat(libs.versions.gjf.get()) } java { configureCommonJavaFormat() target("**/*.java") - targetExclude( - "**/spotless.java", - "**/build/**", - *externalJavaFiles - ) - licenseHeaderFile("spotless/spotless.java") - } - format("externalJava", JavaExtension::class.java) { - // These don't use our spotless config for header files since we don't want to overwrite the - // existing copyright headers. - configureCommonJavaFormat() - target(*externalJavaFiles) + targetExclude("**/build/**",) } kotlin { ktlint(libs.versions.ktlint.get()).userData(mapOf("indent_size" to "2")) target("**/*.kt") trimTrailingWhitespace() endWithNewline() - licenseHeaderFile("spotless/spotless.kt") - .updateYearWithLatest(false) - targetExclude("**/Dependencies.kt", "**/spotless.kt", "**/build/**") + targetExclude("**/Dependencies.kt", "**/build/**") } kotlinGradle { ktlint(libs.versions.ktlint.get()).userData(mapOf("indent_size" to "2")) target("**/*.gradle.kts") trimTrailingWhitespace() endWithNewline() - licenseHeaderFile("spotless/spotless.kts", "(import|plugins|buildscript|dependencies|pluginManagement)") } } diff --git a/spotless/spotless.java b/spotless/spotless.java deleted file mode 100644 index e6223bc..0000000 --- a/spotless/spotless.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) $YEAR 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. - */ diff --git a/spotless/spotless.kt b/spotless/spotless.kt deleted file mode 100644 index e6223bc..0000000 --- a/spotless/spotless.kt +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) $YEAR 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. - */ diff --git a/spotless/spotless.kts b/spotless/spotless.kts deleted file mode 100644 index 387b973..0000000 --- a/spotless/spotless.kts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) $YEAR 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. - */ -