diff --git a/README.md b/README.md index 15d6156..20ddb28 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -CommunityRadar - Official - Forge Mod 1.8.9 +CommunityRadar - Official - Forge Mod (1.8.9 & 1.12.2) ========================== [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4.svg)](#code-of-conduct) diff --git a/build.gradle.kts b/build.gradle.kts index 258076f..c490762 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -30,6 +30,30 @@ allprojects { repositories { mavenCentral() } + + plugins.withId("com.diffplug.spotless") { + spotless { + java { + licenseHeaderFile(rootProject.file("HEADER")) + endWithNewline() + trimTrailingWhitespace() + removeUnusedImports() + removeWildcardImports() + } + + kotlinGradle { + licenseHeaderFile(rootProject.file("HEADER"), "(plugins|import|buildscript|pluginManagement|base)") + endWithNewline() + trimTrailingWhitespace() + } + + kotlin { + licenseHeaderFile(rootProject.file("HEADER")) + endWithNewline() + trimTrailingWhitespace() + } + } + } } subprojects { @@ -97,22 +121,6 @@ subprojects { } } -spotless { - java { - licenseHeaderFile(rootProject.file("HEADER")) - endWithNewline() - trimTrailingWhitespace() - removeUnusedImports() - removeWildcardImports() - } - - kotlin { - licenseHeaderFile(rootProject.file("HEADER")) - endWithNewline() - trimTrailingWhitespace() - } -} - tasks { named("jar").configure { enabled = false diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 72e971a..add576c 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -1,5 +1,18 @@ -import org.gradle.kotlin.dsl.libs - +/* + * Copyright 2024 - present CommunityRadarGG + * + * 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 + * + * http://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. + */ base { archivesName.set("common") } diff --git a/common/src/main/java/io/github/communityradargg/forgemod/command/RootRadarCommand.java b/common/src/main/java/io/github/communityradargg/forgemod/command/RootRadarCommand.java index 3c986d8..416e5e6 100644 --- a/common/src/main/java/io/github/communityradargg/forgemod/command/RootRadarCommand.java +++ b/common/src/main/java/io/github/communityradargg/forgemod/command/RootRadarCommand.java @@ -1,3 +1,18 @@ +/* + * Copyright 2024 - present CommunityRadarGG + * + * 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 + * + * http://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. + */ package io.github.communityradargg.forgemod.command; import io.github.communityradargg.forgemod.util.CommonHandler; diff --git a/common/src/main/java/io/github/communityradargg/forgemod/util/CommonHandler.java b/common/src/main/java/io/github/communityradargg/forgemod/util/CommonHandler.java index 6f1a556..6f02d1c 100644 --- a/common/src/main/java/io/github/communityradargg/forgemod/util/CommonHandler.java +++ b/common/src/main/java/io/github/communityradargg/forgemod/util/CommonHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright 2024 - present CommunityRadarGG + * + * 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 + * + * http://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. + */ package io.github.communityradargg.forgemod.util; import com.google.gson.Gson; diff --git a/common/src/main/java/io/github/communityradargg/forgemod/util/PlayerInfo.java b/common/src/main/java/io/github/communityradargg/forgemod/util/PlayerInfo.java index bf8fa0a..7b8156c 100644 --- a/common/src/main/java/io/github/communityradargg/forgemod/util/PlayerInfo.java +++ b/common/src/main/java/io/github/communityradargg/forgemod/util/PlayerInfo.java @@ -1,3 +1,18 @@ +/* + * Copyright 2024 - present CommunityRadarGG + * + * 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 + * + * http://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. + */ package io.github.communityradargg.forgemod.util; import org.jetbrains.annotations.NotNull; diff --git a/common/src/main/java/io/github/communityradargg/forgemod/util/PlayerNameUuidCache.java b/common/src/main/java/io/github/communityradargg/forgemod/util/PlayerNameUuidCache.java index 24939a0..28ce44e 100644 --- a/common/src/main/java/io/github/communityradargg/forgemod/util/PlayerNameUuidCache.java +++ b/common/src/main/java/io/github/communityradargg/forgemod/util/PlayerNameUuidCache.java @@ -1,3 +1,18 @@ +/* + * Copyright 2024 - present CommunityRadarGG + * + * 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 + * + * http://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. + */ package io.github.communityradargg.forgemod.util; import com.google.common.cache.Cache; diff --git a/common/src/main/java/io/github/communityradargg/forgemod/util/VersionBridge.java b/common/src/main/java/io/github/communityradargg/forgemod/util/VersionBridge.java index ef09ea3..d079bf1 100644 --- a/common/src/main/java/io/github/communityradargg/forgemod/util/VersionBridge.java +++ b/common/src/main/java/io/github/communityradargg/forgemod/util/VersionBridge.java @@ -1,3 +1,18 @@ +/* + * Copyright 2024 - present CommunityRadarGG + * + * 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 + * + * http://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. + */ package io.github.communityradargg.forgemod.util; import org.jetbrains.annotations.NotNull; diff --git a/settings.gradle.kts b/settings.gradle.kts index 96787bb..17f0f07 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -13,8 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -rootProject.name = "communityradar-forge" - pluginManagement { repositories { gradlePluginPortal() @@ -41,6 +39,8 @@ plugins { id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0") } +rootProject.name = "communityradar-forge" + include("common") listOf("1.8.9", "1.12.2").forEach { version -> diff --git a/versions/1.12.2/build.gradle.kts b/versions/1.12.2/build.gradle.kts index 3beb05d..5628e70 100644 --- a/versions/1.12.2/build.gradle.kts +++ b/versions/1.12.2/build.gradle.kts @@ -1,3 +1,18 @@ +/* + * Copyright 2024 - present CommunityRadarGG + * + * 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 + * + * http://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 dev.architectury.pack200.java.Pack200Adapter val versionText: String by extra diff --git a/versions/1.12.2/src/main/java/io/github/communityradargg/forgemod/util/VersionBridgeImpl.java b/versions/1.12.2/src/main/java/io/github/communityradargg/forgemod/util/VersionBridgeImpl.java index 132888f..854e022 100644 --- a/versions/1.12.2/src/main/java/io/github/communityradargg/forgemod/util/VersionBridgeImpl.java +++ b/versions/1.12.2/src/main/java/io/github/communityradargg/forgemod/util/VersionBridgeImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright 2024 - present CommunityRadarGG + * + * 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 + * + * http://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. + */ package io.github.communityradargg.forgemod.util; import com.mojang.authlib.GameProfile; diff --git a/versions/1.8.9/build.gradle.kts b/versions/1.8.9/build.gradle.kts index 1c9694f..73bff6a 100644 --- a/versions/1.8.9/build.gradle.kts +++ b/versions/1.8.9/build.gradle.kts @@ -1,3 +1,18 @@ +/* + * Copyright 2024 - present CommunityRadarGG + * + * 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 + * + * http://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 dev.architectury.pack200.java.Pack200Adapter val versionText: String by extra diff --git a/versions/1.8.9/src/main/java/io/github/communityradargg/forgemod/util/VersionBridgeImpl.java b/versions/1.8.9/src/main/java/io/github/communityradargg/forgemod/util/VersionBridgeImpl.java index 61e7fea..ed3a6d4 100644 --- a/versions/1.8.9/src/main/java/io/github/communityradargg/forgemod/util/VersionBridgeImpl.java +++ b/versions/1.8.9/src/main/java/io/github/communityradargg/forgemod/util/VersionBridgeImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright 2024 - present CommunityRadarGG + * + * 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 + * + * http://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. + */ package io.github.communityradargg.forgemod.util; import com.mojang.authlib.GameProfile;