Skip to content

Commit

Permalink
Adjust annotations for CreateBundlerJar
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Dec 17, 2024
1 parent 88b79ad commit b603072
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class BundlerJarTasks(
libraryArtifacts.set(
artifacts.map { a ->
a.map {
val obj = objects.newInstance(CreateBundlerJar.Artifact::class)
val obj = objects.newInstance(CreateBundlerJar.LibraryArtifact::class)
obj.id.set(it.id)
obj.path.set(it.file)
obj.variant.set(it.variant)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,13 @@ abstract class CreateBundlerJar : ZippedTask() {

@get:Nested
@get:Optional
abstract val libraryArtifacts: ListProperty<Artifact>
abstract val libraryArtifacts: ListProperty<LibraryArtifact>

// Gradle wants us to split the file inputs from the metadata inputs, but then we would lose association.
// So we include the file input (not properly tracked as produced by the configuration) in Artifact, but also
// So we include the file input (not properly tracked as produced by the configuration) in LibraryArtifact, but also
// depend on the configuration normally without meta to ensure the file's dependencies run.
@get:InputFiles
@get:Classpath
@get:Optional
@get:PathSensitive(PathSensitivity.NONE)
abstract val libraryArtifactsFiles: ConfigurableFileCollection

@get:PathSensitive(PathSensitivity.NONE)
Expand Down Expand Up @@ -200,9 +199,8 @@ abstract class CreateBundlerJar : ZippedTask() {
}
}

abstract class Artifact {
@get:InputFile
@get:PathSensitive(PathSensitivity.NONE)
abstract class LibraryArtifact {
@get:Internal
abstract val path: RegularFileProperty

@get:Input
Expand Down

0 comments on commit b603072

Please sign in to comment.