-
Notifications
You must be signed in to change notification settings - Fork 18
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
add classifier and extension to coordinate #87
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
dependencies | ||
} | ||
|
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.
stray newlines
@@ -126,6 +143,7 @@ class GradleDependencyGenerator { | |||
|
|||
gradleRoot.mkdirs() | |||
def rootBuildGradle = new File(gradleRoot, BUILD_GRADLE) | |||
|
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.
stray newline
@@ -156,6 +174,8 @@ class GradleDependencyGenerator { | |||
version = '${node.version}' | |||
ext { | |||
artifactName = '${node.artifact}' | |||
extensionName = '${node.extension? node.extension: "jar"}' | |||
classifierName = ${node.classifier? "'" + node.classifier + "'": null} |
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.
use string interpolation
@@ -240,6 +328,8 @@ class GradleDependencyGeneratorSpec extends Specification { | |||
block == expectedBlock | |||
} | |||
|
|||
// todo: make some changes down here for classifier and extension |
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.
resolve todo?
dep.classifier == 'bar' | ||
dep.extension == 'zip' | ||
} | ||
|
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.
extra newline
module.extension == null | ||
module.dependencies.size() == 0 | ||
} | ||
|
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.
extra newline
def repo = new File(directory) | ||
new File(repo, 'test.maven.foo_1_0_0/build.gradle').text.contains 'compile \'test.maven:bar:1.+:baz@zip\'' | ||
def pom = new File(repo, 'mavenrepo/test/maven/foo/1.0.0/foo-1.0.0.pom').text | ||
pom.contains '<groupId>test.maven</groupId>' |
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.
almost seems like you want to test that the entire block exists. Once you strip whitespace/newlines you should be able to test for contains
def repo = new File(directory) | ||
new File(repo, 'test.ivy.foo_1_0_0/build.gradle').text.contains 'compile \'test.ivy:bar:1.1.0:baz@zip\'' | ||
def xml = new File(repo, 'ivyrepo/test/ivy/foo/1.0.0/foo-1.0.0-ivy.xml').text | ||
xml.contains '<dependency org="test.ivy" name="bar" rev="1.1.0" conf="compile->default" transitive="false">' |
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.
same as below
@DanielThomas @rspieldenner could you take a look at this as well? |
Fixes #85