aboutsummaryrefslogtreecommitdiff
path: root/runners/maven-plugin/build.gradle
diff options
context:
space:
mode:
authorEugene Petrenko <eugene.petrenko@gmail.com>2018-09-11 14:03:29 +0300
committerEugene Petrenko <eugene.petrenko@gmail.com>2018-09-11 14:03:29 +0300
commita54070f5db04d05b48c369b211efe044fbc02a8d (patch)
treeaac5889906f49f68c39e1416ea39d4d19bad008e /runners/maven-plugin/build.gradle
parente29f1c966056b0f7ee31dd9bd7d55f9e526fa7fe (diff)
parent0df19264ccae3d294946caf634ee15eea0c4fe4a (diff)
downloaddokka-a54070f5db04d05b48c369b211efe044fbc02a8d.tar.gz
dokka-a54070f5db04d05b48c369b211efe044fbc02a8d.tar.bz2
dokka-a54070f5db04d05b48c369b211efe044fbc02a8d.zip
Merge remote-tracking branch 'zub/dev-multiplatf' into kotlin-website-jonnyzzz
Diffstat (limited to 'runners/maven-plugin/build.gradle')
-rw-r--r--runners/maven-plugin/build.gradle56
1 files changed, 4 insertions, 52 deletions
diff --git a/runners/maven-plugin/build.gradle b/runners/maven-plugin/build.gradle
index 0e8d6a4d..79a8c22b 100644
--- a/runners/maven-plugin/build.gradle
+++ b/runners/maven-plugin/build.gradle
@@ -1,4 +1,5 @@
import groovy.io.FileType
+import org.jetbrains.CorrectShadowPublishing
import org.jetbrains.CrossPlatformExec
import java.nio.file.Files
@@ -27,6 +28,7 @@ dependencies {
shadow "org.codehaus.plexus:plexus-utils:$plexus_utils_version"
shadow "org.codehaus.plexus:plexus-archiver:$plexus_archiver_version"
shadow "org.apache.maven.plugin-tools:maven-plugin-annotations:$maven_plugin_tools_version"
+ shadow "com.github.olivergondza:maven-jdk-tools-wrapper:0.1"
}
task generatePom() {
@@ -92,64 +94,14 @@ apply plugin: 'maven-publish'
publishing {
publications {
- dokkaMavenPlugin(MavenPublication) { publication ->
+ dokkaMavenPlugin(MavenPublication) { MavenPublication publication ->
artifactId = 'dokka-maven-plugin'
artifact sourceJar {
classifier "sources"
}
- project.shadow.component(publication)
-
- pom.withXml {
- Node root = asNode()
-
- def dependency = new XmlParser().parseText('''
- <dependency>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- <version>1.8.0</version>
- <scope>system</scope>
- <systemPath>${toolsjar}</systemPath>
- </dependency>
- ''')
-
- root.children().find {
- return it.name() == "dependencies"
- }.append(dependency)
-
- def profiles = new XmlParser().parseText('''
- <profiles>
- <profile>
- <id>default-profile</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- <file>
- <exists>${java.home}/../lib/tools.jar</exists>
- </file>
- </activation>
- <properties>
- <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
- </properties>
- </profile>
- <profile>
- <id>mac-profile</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- <file>
- <exists>${java.home}/../Classes/classes.jar</exists>
- </file>
- </activation>
- <properties>
- <toolsjar>${java.home}/../Classes/classes.jar</toolsjar>
- </properties>
- </profile>
- </profiles>
- ''')
- root.append(profiles)
- }
-
-
+ CorrectShadowPublishing.configure(publication, project)
}
}
}