-
Notifications
You must be signed in to change notification settings - Fork 617
Update semver tests and the pom validator tests to handle new sdk #5133
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
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 |
---|---|---|
|
@@ -43,10 +43,15 @@ abstract class PomValidator : DefaultTask() { | |
|
||
@TaskAction | ||
fun run() { | ||
var diff = diffWithPomFromURL(getLatestReleasePomUrl()) | ||
try { | ||
var diff = diffWithPomFromURL(getLatestReleasePomUrl()) | ||
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 realize I accidentally left this as |
||
|
||
if (diff.isNotEmpty()) { | ||
throw GradleException("Dependency version errors found:\n${diff}") | ||
if (diff.isNotEmpty()) { | ||
throw GradleException("Dependency version errors found:\n${diff}") | ||
} | ||
} catch (_: java.io.FileNotFoundException) { | ||
// Gmaven artifact doesn't exist. | ||
return | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,11 @@ abstract class GmavenCopier : DefaultTask() { | |
mavenHelper.getLatestReleasedVersion(), | ||
!aarAndroidFile.get() | ||
) | ||
URL(gMavenPath).openStream().use { Files.copy(it, Paths.get(filePath.get())) } | ||
try { | ||
URL(gMavenPath).openStream().use { Files.copy(it, Paths.get(filePath.get())) } | ||
} catch (_: java.io.FileNotFoundException) { | ||
// Gmaven Artifact doesn't exist. | ||
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. You should be fine to replace these empty returns with throw StopActionException("GMaven artifact doesn't exist") |
||
return | ||
} | ||
} | ||
} |
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.
Keep in mind that if this file is added by any task- this will fail. This check will occur at configuration time, not execution time.