-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix addMainModuleInfo
erroneously considered UP-TO-DATE
#17
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ import org.gradle.api.GradleException | |
import org.gradle.api.Project | ||
import org.gradle.api.tasks.Input | ||
import org.gradle.api.tasks.InputFile | ||
import org.gradle.api.tasks.Nested | ||
import org.gradle.api.tasks.Optional | ||
import org.gradle.api.tasks.PathSensitive | ||
import org.gradle.api.tasks.PathSensitivity | ||
|
@@ -44,9 +45,13 @@ abstract class AbstractModuleConfiguration { | |
@Input @Optional | ||
String mainClass | ||
|
||
@Input | ||
abstract String getShortName() | ||
@InputFile | ||
abstract File getInputJar() | ||
@Input | ||
abstract String getVersion() | ||
@Nested | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have not tested this. |
||
abstract Set<ModuleId> getOptionalDependencies() | ||
|
||
AbstractModuleConfiguration(Project project) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,6 @@ class ModuleConfiguration extends AbstractModuleConfiguration { | |
primaryArtifact.file | ||
} | ||
|
||
@Input | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume this is redundant because the overridden method already defines this (but have not tested this!). |
||
@Override | ||
String getVersion() { | ||
primaryArtifact.moduleVersion.id.version | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,12 @@ | |
package org.moditect.gradleplugin.common | ||
|
||
import groovy.transform.Canonical | ||
import org.gradle.api.tasks.Input | ||
|
||
@Canonical | ||
class ModuleId implements Serializable { | ||
@Input | ||
String group | ||
@Input | ||
Comment on lines
+23
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it makes sense to define these as inputs, but I have not tested this. |
||
String name | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have not specified
@PathSensitive(PathSensitivity.NONE)
here because forAddMainModuleInfoTask
the path matters since the file is overwritten.I hope this does not cause issues for
ModuleConfiguration
which overrides this method and adds its own annotations.