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