From 173ae6afffa8b25623be616c27944ee05e0cb580 Mon Sep 17 00:00:00 2001 From: Roberto Perez Alcolea Date: Fri, 8 Jan 2021 14:51:41 -0600 Subject: [PATCH] Gradle 6.8 --- gradle/wrapper/gradle-wrapper.properties | 2 +- .../com/netflix/gradle/plugins/deb/DebCopyAction.groovy | 5 ++--- .../gradle/plugins/packaging/SystemPackagingTask.groovy | 5 ++++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4d9ca164..da9702f9 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/src/main/groovy/com/netflix/gradle/plugins/deb/DebCopyAction.groovy b/src/main/groovy/com/netflix/gradle/plugins/deb/DebCopyAction.groovy index 126fac57..22e7c559 100755 --- a/src/main/groovy/com/netflix/gradle/plugins/deb/DebCopyAction.groovy +++ b/src/main/groovy/com/netflix/gradle/plugins/deb/DebCopyAction.groovy @@ -307,10 +307,9 @@ class DebCopyAction extends AbstractPackagingCopyAction { */ 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(), @@ -339,7 +338,7 @@ class DebCopyAction extends AbstractPackagingCopyAction { // Uses install command for directory dirs: installDirs.collect { InstallDir dir -> [install: installLineGenerator.generate(dir)] } ] - } + return context } diff --git a/src/main/groovy/com/netflix/gradle/plugins/packaging/SystemPackagingTask.groovy b/src/main/groovy/com/netflix/gradle/plugins/packaging/SystemPackagingTask.groovy index 9cfcae41..89befa36 100755 --- a/src/main/groovy/com/netflix/gradle/plugins/packaging/SystemPackagingTask.groovy +++ b/src/main/groovy/com/netflix/gradle/plugins/packaging/SystemPackagingTask.groovy @@ -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() ?: '' }) @@ -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(/-/, '~') }