Created
January 13, 2016 02:24
-
-
Save mdaniel/0bd88720362d5abc3e9b to your computer and use it in GitHub Desktop.
Gradle patches that permit the use of a jarsigned plugin (as well as fixing two NPEs)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This patch was tested against every 2.x release tag in https://github.com/gradle/gradle.git and applies cleanly to all of them, | |
except for the following error message: | |
> warning: inexact rename detection was skipped due to too many files. | |
> warning: you may want to set your merge.renamelimit variable to at least 4384 and retry the command. | |
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/AsmBackedClassGenerator.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/AsmBackedClassGenerator.java | |
index abbb13b..6e9f26d 100644 | |
--- a/subprojects/core/src/main/groovy/org/gradle/api/internal/AsmBackedClassGenerator.java | |
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/AsmBackedClassGenerator.java | |
@@ -77,7 +77,7 @@ public class AsmBackedClassGenerator extends AbstractClassGenerator { | |
this.type = type; | |
visitor = new ClassWriter(ClassWriter.COMPUTE_MAXS); | |
- typeName = type.getName() + "_Decorated"; | |
+ typeName = "generated."+type.getName() + "_Decorated"; | |
generatedType = Type.getType("L" + typeName.replaceAll("\\.", "/") + ";"); | |
superclassType = Type.getType(type); | |
extensible = classMetaData.isExtensible(); | |
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskDependency.java | |
index c4dea3c..94faf27 100644 | |
--- a/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskDependency.java | |
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskDependency.java | |
@@ -105,14 +105,18 @@ public class DefaultTaskDependency extends AbstractTaskDependency { | |
public void setValues(Iterable<?> values) { | |
this.values.clear(); | |
- for (Object value : values) { | |
- addValue(value); | |
+ if (null != values) { | |
+ for (Object value : values) { | |
+ addValue(value); | |
+ } | |
} | |
} | |
public DefaultTaskDependency add(Object... values) { | |
- for (Object value : values) { | |
- addValue(value); | |
+ if (null != values) { | |
+ for (Object value : values) { | |
+ addValue(value); | |
+ } | |
} | |
return this; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment