mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-16 06:27:39 +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/
25 lines
814 B
Kotlin
25 lines
814 B
Kotlin
// SPDX-FileCopyrightText: 2022 The CC: Tweaked Developers
|
|
//
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package cc.tweaked.gradle
|
|
|
|
import org.gradle.api.tasks.SourceSet
|
|
|
|
data class SourceSetReference(
|
|
val sourceSet: SourceSet,
|
|
val classes: Boolean,
|
|
val external: Boolean,
|
|
) {
|
|
companion object {
|
|
/** A source set in the current project. */
|
|
fun internal(sourceSet: SourceSet) = SourceSetReference(sourceSet, classes = true, external = false)
|
|
|
|
/** A source set from another project. */
|
|
fun external(sourceSet: SourceSet) = SourceSetReference(sourceSet, classes = true, external = true)
|
|
|
|
/** A source set which is inlined into the current project. */
|
|
fun inline(sourceSet: SourceSet) = SourceSetReference(sourceSet, classes = false, external = false)
|
|
}
|
|
}
|