mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-22 17:37:38 +00:00

This adds SPDX license headers to all source code files, following the REUSE[1] specification. This does not include any asset files (such as generated JSON files, or textures). While REUSE does support doing so with ".license" files, for now we define these licences using the .reuse/dep5 file. [1]: https://reuse.software/
30 lines
922 B
Kotlin
30 lines
922 B
Kotlin
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
|
//
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package cc.tweaked.gradle
|
|
|
|
import org.gradle.api.Plugin
|
|
import org.gradle.api.Project
|
|
import org.gradle.api.plugins.JavaPlugin
|
|
import org.gradle.api.plugins.JavaPluginExtension
|
|
import org.gradle.jvm.toolchain.JavaLanguageVersion
|
|
|
|
/**
|
|
* Configures projects to match a shared configuration.
|
|
*/
|
|
class CCTweakedPlugin : Plugin<Project> {
|
|
override fun apply(project: Project) {
|
|
val cct = project.extensions.create("cct", CCTweakedExtension::class.java)
|
|
|
|
project.plugins.withType(JavaPlugin::class.java) {
|
|
val sourceSets = project.extensions.getByType(JavaPluginExtension::class.java).sourceSets
|
|
cct.sourceDirectories.add(SourceSetReference.internal(sourceSets.getByName("main")))
|
|
}
|
|
}
|
|
|
|
companion object {
|
|
val JAVA_VERSION = JavaLanguageVersion.of(17)
|
|
}
|
|
}
|