Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

helenyuyu
Copy link

Fixes #85

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 86.427% when pulling 3b4104f on helenyuyu:master into af695f8 on nebula-plugins:master.

}

dependencies
}

Copy link

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)

Copy link

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}
Copy link

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
Copy link

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'
}

Copy link

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
}

Copy link

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>'
Copy link

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-&gt;default" transitive="false">'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as below

@darora
Copy link

darora commented Aug 31, 2017

@DanielThomas @rspieldenner could you take a look at this as well?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 86.427% when pulling 235b2c5 on helenyuyu:master into af695f8 on nebula-plugins:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 86.427% when pulling 235b2c5 on helenyuyu:master into af695f8 on nebula-plugins:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants