diff --git a/plugin/src/main/kotlin/io/github/jmatsu/license/AssemblyOptions.kt b/plugin/src/main/kotlin/io/github/jmatsu/license/AssemblyOptions.kt index 9bfb48e..f95a8fc 100644 --- a/plugin/src/main/kotlin/io/github/jmatsu/license/AssemblyOptions.kt +++ b/plugin/src/main/kotlin/io/github/jmatsu/license/AssemblyOptions.kt @@ -12,6 +12,7 @@ import org.gradle.api.Named import org.gradle.api.reflect.HasPublicType import org.gradle.api.reflect.TypeOf import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Internal import org.gradle.kotlin.dsl.typeOf interface AssemblyOptions : Named { @@ -67,11 +68,15 @@ interface AssemblyOptions : Named { */ @get:Input var targetConfigurations: Set + + @Input + override fun getName(): String } class AssemblyOptionsImpl(private val name: String) : AssemblyOptions, HasPublicType { override fun getName(): String = name + @Internal override fun getPublicType(): TypeOf { return typeOf() } diff --git a/plugin/src/main/kotlin/io/github/jmatsu/license/VariantAwareOptions.kt b/plugin/src/main/kotlin/io/github/jmatsu/license/VariantAwareOptions.kt index 2c6ac20..d831956 100644 --- a/plugin/src/main/kotlin/io/github/jmatsu/license/VariantAwareOptions.kt +++ b/plugin/src/main/kotlin/io/github/jmatsu/license/VariantAwareOptions.kt @@ -7,10 +7,11 @@ import org.gradle.api.Action import org.gradle.api.Named import org.gradle.api.reflect.HasPublicType import org.gradle.api.reflect.TypeOf +import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputDirectory +import org.gradle.api.tasks.Internal import org.gradle.api.tasks.Nested import org.gradle.api.tasks.Optional -import org.gradle.api.tasks.OutputDirectory import org.gradle.api.tasks.PathSensitive import org.gradle.api.tasks.PathSensitivity import org.gradle.kotlin.dsl.typeOf @@ -20,12 +21,18 @@ interface VariantAwareOptions : Named { * @see baseDir */ @Deprecated("the name has been changed. This would be removed in 1.0.0", replaceWith = ReplaceWith("baseDir")) + @get:PathSensitive(PathSensitivity.RELATIVE) + @get:InputDirectory + @get:Optional var artifactDefinitionDirectory: File? /** * @see baseDir */ @Deprecated("this name was produced by a typo. This will be removed in 1.0.0.", replaceWith = ReplaceWith("baseDir")) + @get:PathSensitive(PathSensitivity.RELATIVE) + @get:InputDirectory + @get:Optional var dataDir: File? /** @@ -33,7 +40,6 @@ interface VariantAwareOptions : Named { */ @get:PathSensitive(PathSensitivity.RELATIVE) @get:InputDirectory - @get:OutputDirectory @get:Optional var baseDir: File? @@ -46,6 +52,9 @@ interface VariantAwareOptions : Named { fun assembly(action: Action) fun visualization(action: Action) + + @Input + override fun getName(): String } class VariantAwareOptionsImpl( @@ -72,6 +81,7 @@ class VariantAwareOptionsImpl( action.execute(visualization) } + @Internal override fun getPublicType(): TypeOf { return typeOf() } diff --git a/plugin/src/main/kotlin/io/github/jmatsu/license/VisualizationOptions.kt b/plugin/src/main/kotlin/io/github/jmatsu/license/VisualizationOptions.kt index 5788e4b..0e9454c 100644 --- a/plugin/src/main/kotlin/io/github/jmatsu/license/VisualizationOptions.kt +++ b/plugin/src/main/kotlin/io/github/jmatsu/license/VisualizationOptions.kt @@ -11,6 +11,7 @@ import org.gradle.api.reflect.HasPublicType import org.gradle.api.reflect.TypeOf import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputDirectory +import org.gradle.api.tasks.Internal import org.gradle.api.tasks.Optional import org.gradle.api.tasks.OutputDirectory import org.gradle.api.tasks.PathSensitive @@ -48,15 +49,19 @@ interface VisualizationOptions : Named { /** * An output directory of the generated visualized file. */ - @get:PathSensitive(PathSensitivity.RELATIVE) @get:OutputDirectory @get:Optional var outputDir: File? + + @Input + override fun getName(): String } class VisualizationOptionsImpl( private val name: String ) : VisualizationOptions, HasPublicType { + + @Internal override fun getPublicType(): TypeOf { return typeOf() }