diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-10-08 23:50:29 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-10-08 23:59:19 +0300 |
commit | 2baf338a1eeffa5104ad9d9ec8f1abb0b4c16cf9 (patch) | |
tree | 37291ed15e6ae74e45563e2f9cb57a148891ede1 | |
parent | 206829dfac31505f078f1c114785c550f2135742 (diff) | |
download | dokka-2baf338a1eeffa5104ad9d9ec8f1abb0b4c16cf9.tar.gz dokka-2baf338a1eeffa5104ad9d9ec8f1abb0b4c16cf9.tar.bz2 dokka-2baf338a1eeffa5104ad9d9ec8f1abb0b4c16cf9.zip |
Update ShadowJar Gradle plugin to 2.0.1
-rw-r--r-- | build.gradle | 2 | ||||
-rw-r--r-- | buildSrc/build.gradle | 2 | ||||
-rw-r--r-- | buildSrc/src/main/groovy/org/jetbrains/PluginXmlTransformer.groovy | 11 | ||||
-rw-r--r-- | runners/android-gradle-plugin/build.gradle | 4 | ||||
-rw-r--r-- | runners/fatjar/build.gradle | 4 | ||||
-rw-r--r-- | runners/gradle-plugin/build.gradle | 6 | ||||
-rw-r--r-- | runners/maven-plugin/build.gradle | 5 |
7 files changed, 20 insertions, 14 deletions
diff --git a/build.gradle b/build.gradle index ee265bdc..9d081673 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ allprojects { } dependencies { classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7' - classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3' + classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1' classpath "com.gradle.publish:plugin-publish-plugin:0.9.6" } diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 34bbf762..76c7c4ee 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -10,5 +10,5 @@ repositories { } } dependencies { - compile 'com.github.jengelman.gradle.plugins:shadow:1.2.3' + compile 'com.github.jengelman.gradle.plugins:shadow:2.0.1' }
\ No newline at end of file diff --git a/buildSrc/src/main/groovy/org/jetbrains/PluginXmlTransformer.groovy b/buildSrc/src/main/groovy/org/jetbrains/PluginXmlTransformer.groovy index db84fdc0..7482a01a 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/PluginXmlTransformer.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/PluginXmlTransformer.groovy @@ -2,10 +2,11 @@ package org.jetbrains import com.github.jengelman.gradle.plugins.shadow.relocation.Relocator import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer +import com.github.jengelman.gradle.plugins.shadow.transformers.TransformerContext import groovy.xml.XmlUtil -import org.apache.tools.zip.ZipEntry -import org.apache.tools.zip.ZipOutputStream import org.gradle.api.file.FileTreeElement +import shadow.org.apache.tools.zip.ZipEntry +import shadow.org.apache.tools.zip.ZipOutputStream public class PluginXmlTransformer implements Transformer { private Map<String, Node> transformedPluginXmlFiles = new HashMap<>(); @@ -16,10 +17,12 @@ public class PluginXmlTransformer implements Transformer { } @Override - void transform(String path, InputStream inputStream, List<Relocator> relocators) { + void transform(TransformerContext context) { + def path = context.path + def inputStream = context.is System.out.println(path) Node node = new XmlParser().parse(inputStream) - relocateXml(node, relocators) + relocateXml(node, context.relocators) transformedPluginXmlFiles.put(path, node) } diff --git a/runners/android-gradle-plugin/build.gradle b/runners/android-gradle-plugin/build.gradle index 68152475..8e97d9d9 100644 --- a/runners/android-gradle-plugin/build.gradle +++ b/runners/android-gradle-plugin/build.gradle @@ -47,13 +47,13 @@ apply plugin: 'maven-publish' publishing { publications { - dokkaAndroidGradlePlugin(MavenPublication) { - from components.shadow + dokkaAndroidGradlePlugin(MavenPublication) { publication -> artifactId = 'dokka-android-gradle-plugin' artifact sourceJar { classifier "sources" } + project.shadow.component(publication) } } } diff --git a/runners/fatjar/build.gradle b/runners/fatjar/build.gradle index dbd56f3c..e3bea7ed 100644 --- a/runners/fatjar/build.gradle +++ b/runners/fatjar/build.gradle @@ -36,9 +36,9 @@ apply plugin: 'maven-publish' publishing { publications { - dokkaFatJar(MavenPublication) { - from components.shadow + dokkaFatJar(MavenPublication) { publication -> artifactId = 'dokka-fatjar' + project.shadow.component(publication) } } } diff --git a/runners/gradle-plugin/build.gradle b/runners/gradle-plugin/build.gradle index 7b859908..5af6b427 100644 --- a/runners/gradle-plugin/build.gradle +++ b/runners/gradle-plugin/build.gradle @@ -45,13 +45,15 @@ apply plugin: 'maven-publish' publishing { publications { - dokkaGradlePlugin(MavenPublication) { - from components.shadow + dokkaGradlePlugin(MavenPublication) { publication -> + artifactId = 'dokka-gradle-plugin' artifact sourceJar { classifier "sources" } + + project.shadow.component(publication) } } } diff --git a/runners/maven-plugin/build.gradle b/runners/maven-plugin/build.gradle index 5176957e..bac05b2b 100644 --- a/runners/maven-plugin/build.gradle +++ b/runners/maven-plugin/build.gradle @@ -60,8 +60,7 @@ apply plugin: 'maven-publish' publishing { publications { - dokkaMavenPlugin(MavenPublication) { - from components.shadow + dokkaMavenPlugin(MavenPublication) { publication -> artifactId = 'dokka-maven-plugin' artifact sourceJar { @@ -115,6 +114,8 @@ publishing { ''') root.append(profiles) } + + project.shadow.component(publication) } } } |