Annotate internal
This commit is contained in:
parent
8765d69f00
commit
25ea37e371
|
@ -5,12 +5,14 @@ import org.gradle.api.Project
|
|||
import org.gradle.api.provider.ListProperty
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.Nested
|
||||
import org.jetbrains.annotations.ApiStatus.Internal
|
||||
|
||||
interface JfModExtension: LomExtension {
|
||||
val libJfVersion: Property<String>
|
||||
@get:Nested val curseforge: CurseForge
|
||||
@get:Nested val modrinth: Modrinth
|
||||
|
||||
@Internal
|
||||
override fun check(proj: Project) {
|
||||
super.check(proj)
|
||||
libJfVersion.finalizeValue()
|
||||
|
@ -28,6 +30,7 @@ interface JfModExtension: LomExtension {
|
|||
val requiredDependencies: ListProperty<String>
|
||||
val optionalDependencies: ListProperty<String>
|
||||
|
||||
@Internal
|
||||
fun check(proj: Project) {
|
||||
projectId.finalizeValue()
|
||||
requiredDependencies.finalizeValue()
|
||||
|
@ -44,6 +47,7 @@ interface JfModExtension: LomExtension {
|
|||
val requiredDependencies: ListProperty<String>
|
||||
val optionalDependencies: ListProperty<String>
|
||||
|
||||
@Internal
|
||||
fun check(proj: Project) {
|
||||
projectId.finalizeValue()
|
||||
requiredDependencies.finalizeValue()
|
||||
|
|
|
@ -2,7 +2,9 @@ package io.gitlab.jfronny.scripts
|
|||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.BasePluginExtension
|
||||
import org.jetbrains.annotations.ApiStatus.Internal
|
||||
|
||||
@Internal
|
||||
fun Project.legacyCheck(jfMod: JfModExtension) {
|
||||
val splitRegex = Regex(", ?")
|
||||
fun String.splitByComma() = splitRegex.split(this).filter { it.isNotBlank() }
|
||||
|
|
|
@ -2,10 +2,12 @@ package io.gitlab.jfronny.scripts
|
|||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.provider.Property
|
||||
import org.jetbrains.annotations.ApiStatus.Internal
|
||||
|
||||
interface JfModuleExtension {
|
||||
val devOnly: Property<Boolean>
|
||||
|
||||
@Internal
|
||||
fun check(proj: Project) {
|
||||
devOnly.finalizeValue()
|
||||
require(proj != proj.rootProject || !devOnly.getOrElse(false)) { "Root project may not be devOnly" }
|
||||
|
|
Loading…
Reference in New Issue