diff --git a/build.gradle b/build.gradle index d28976545cc..3942b6c2e40 100644 --- a/build.gradle +++ b/build.gradle @@ -70,7 +70,9 @@ subprojects { all().each { task -> // Recompile protos when build.gradle has been changed, because // it's possible the version of protoc has been changed. - task.inputs.file "${rootProject.projectDir}/build.gradle" + task.inputs.file("${rootProject.projectDir}/build.gradle") + .withPathSensitivity(PathSensitivity.RELATIVE) + .withPropertyName('root build.gradle') if (isAndroid) { task.builtins { java { option 'lite' } diff --git a/netty/shaded/build.gradle b/netty/shaded/build.gradle index 0a9be812d7b..2feddf4cd3c 100644 --- a/netty/shaded/build.gradle +++ b/netty/shaded/build.gradle @@ -1,4 +1,5 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer +import com.github.jengelman.gradle.plugins.shadow.transformers.CacheableTransformer import com.github.jengelman.gradle.plugins.shadow.transformers.TransformerContext import org.gradle.api.file.FileTreeElement import shadow.org.apache.tools.zip.ZipOutputStream @@ -140,6 +141,7 @@ tasks.named("test").configure { * A Transformer which updates the Netty JAR META-INF/ resources to accurately * reference shaded class names. */ +@CacheableTransformer class NettyResourceTransformer implements Transformer { // A map of resource file paths to be modified