-
Notifications
You must be signed in to change notification settings - Fork 30
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
added missing items to feature #152
Open
robserm
wants to merge
5
commits into
stempler:master
Choose a base branch
from
robserm:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4044089
added description and copyright to feature config
robserm f0c7868
added description and copyright to feature config
robserm b5e1c65
added required features
robserm 5ac6f9c
Merge branch 'stempler:master' into master
robserm e3b4a3a
disable signing
robserm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,9 @@ class ArtifactFeature implements Feature { | |
final String version | ||
final String providerName | ||
final String license | ||
|
||
final String description | ||
final String copyright | ||
|
||
/** | ||
* List of artifact references | ||
*/ | ||
|
@@ -53,7 +55,12 @@ class ArtifactFeature implements Feature { | |
* List of included features IDs | ||
*/ | ||
final List<String> configFeatures = [] | ||
|
||
|
||
/** | ||
* List of required features | ||
*/ | ||
List<RequiredFeature> requiredFeatures = [] | ||
|
||
private String finalVersion | ||
|
||
ArtifactFeature(Project project, def featureNotation, | ||
|
@@ -65,14 +72,18 @@ class ArtifactFeature implements Feature { | |
def version | ||
def providerName | ||
def license | ||
|
||
def description | ||
def copyright | ||
|
||
// extract basic feature information from feature notation | ||
if (featureNotation instanceof Map) { | ||
id = featureNotation.id | ||
label = featureNotation.name | ||
version = featureNotation.version | ||
providerName = featureNotation.provider | ||
license = featureNotation.license | ||
description = featureNotation.description | ||
copyright = featureNotation.copyright | ||
} | ||
else { | ||
// assume String id and default values | ||
|
@@ -93,7 +104,9 @@ class ArtifactFeature implements Feature { | |
this.id = id | ||
this.label = label ?: id | ||
this.license = license ?: "" | ||
|
||
this.description = description ?: "" | ||
this.copyright = copyright ?: "" | ||
|
||
// create masking delegate to be able to intercept internal call results | ||
Closure maskedConfig = null | ||
CustomConfigDelegate maskingDelegate = null | ||
|
@@ -186,7 +199,7 @@ class ArtifactFeature implements Feature { | |
project.platform.features[it] | ||
}.findAll() | ||
} | ||
|
||
/** | ||
* Delegate for the configuration closure to intercept calls | ||
* for the feature configuration. | ||
|
@@ -203,6 +216,18 @@ class ArtifactFeature implements Feature { | |
def invokeMethod(String name, def args) { | ||
//TODO support manually adding a feature reference | ||
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 guess the TODO can be removed then? |
||
|
||
if (name == "requires") { | ||
def requiredNotation = args[0] | ||
if (requiredNotation instanceof Map) { | ||
def featureName = requiredNotation.featureName | ||
def version = requiredNotation.version | ||
def match = requiredNotation.match | ||
def required = new RequiredFeature(featureName, version, match) | ||
feature.requiredFeatures.add(required) | ||
} | ||
return | ||
} | ||
|
||
/* | ||
* If there are further nested closures inside features | ||
* that have OWNER_FIRST resolve strategy, the PlatformPluginExtension | ||
|
@@ -229,7 +254,7 @@ class ArtifactFeature implements Feature { | |
|
||
result | ||
} | ||
|
||
@Override | ||
def getProperty(String name) { | ||
if (name == 'includes') { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please exclude these changes.