Skip to content

Commit

Permalink
Gradle 6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea committed Jan 11, 2021
1 parent 3074516 commit 173ae6a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,9 @@ class DebCopyAction extends AbstractPackagingCopyAction<Deb> {
*/
def Map toContext() {
Map context = [:]
DeprecationLoggerUtils.whileDisabled {
context = [
name: task.getPackageName(),
version: task.getVersion(),
version: task.getArchiveVersion().get(),
release: task.getRelease(),
maintainer: task.getMaintainer(),
uploaders: task.getUploaders(),
Expand Down Expand Up @@ -339,7 +338,7 @@ class DebCopyAction extends AbstractPackagingCopyAction<Deb> {
// Uses install command for directory
dirs: installDirs.collect { InstallDir dir -> [install: installLineGenerator.generate(dir)] }
]
}

return context
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ abstract class SystemPackagingTask extends AbstractArchiveTask {
parentExten?.getPackageName() ?: getArchiveBaseName().getOrNull()
})
mapping.map('release', { parentExten?.getRelease() ?: getArchiveClassifier().getOrNull() })
mapping.map('version', { sanitizeVersion(parentExten?.getVersion() ?: project.getVersion().toString()) })
mapping.map('version', { doSomething() })
mapping.map('epoch', { parentExten?.getEpoch() ?: 0 })
mapping.map('signingKeyId', { parentExten?.getSigningKeyId() ?: '' })
mapping.map('signingKeyPassphrase', { parentExten?.getSigningKeyPassphrase() ?: '' })
Expand Down Expand Up @@ -126,6 +126,9 @@ abstract class SystemPackagingTask extends AbstractArchiveTask {
}
}

private String doSomething() {
sanitizeVersion(parentExten?.getVersion() ?: project.getVersion().toString())
}
String sanitizeVersion(String version) {
version == 'unspecified' ? '0' : version.replaceAll(/\+.*/, '').replaceAll(/-/, '~')
}
Expand Down

0 comments on commit 173ae6a

Please # to comment.