aboutsummaryrefslogtreecommitdiff
path: root/runners
diff options
context:
space:
mode:
authorEugene Petrenko <eugene.petrenko@gmail.com>2018-09-11 19:31:13 +0300
committerEugene Petrenko <eugene.petrenko@gmail.com>2018-09-11 19:31:13 +0300
commit39f91ce66c234c9bc7ce67d7d661f3882b1a58c4 (patch)
tree9ae83a2093764068b98d08e6a64a830f1d976a64 /runners
parentb3913cdb97f1f2863c9e4001e0aacdca857f7ba5 (diff)
downloaddokka-39f91ce66c234c9bc7ce67d7d661f3882b1a58c4.tar.gz
dokka-39f91ce66c234c9bc7ce67d7d661f3882b1a58c4.tar.bz2
dokka-39f91ce66c234c9bc7ce67d7d661f3882b1a58c4.zip
download maven from Gradle
Diffstat (limited to 'runners')
-rw-r--r--runners/maven-plugin/build.gradle22
1 files changed, 20 insertions, 2 deletions
diff --git a/runners/maven-plugin/build.gradle b/runners/maven-plugin/build.gradle
index 79a8c22b..7e94058e 100644
--- a/runners/maven-plugin/build.gradle
+++ b/runners/maven-plugin/build.gradle
@@ -19,7 +19,13 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
}
}
+configurations {
+ maven
+}
+
dependencies {
+ maven group: "org.apache.maven", name: 'apache-maven', version: maven_version, classifier: 'bin', ext: 'zip'
+
shadow project(":runners:fatjar")
shadow "org.apache.maven:maven-core:$maven_version"
shadow "org.apache.maven:maven-model:$maven_version"
@@ -31,6 +37,18 @@ dependencies {
shadow "com.github.olivergondza:maven-jdk-tools-wrapper:0.1"
}
+final File mavenHome = new File(buildDir, "maven-bin")
+final File mvn = new File(mavenHome, "apache-maven-$maven_version/bin/mvn")
+
+tasks.clean.doLast {
+ delete mavenHome
+}
+
+task setupMaven(type: Sync) {
+ from configurations.maven.collect{ zipTree(it) }
+ into "$buildDir/maven-bin"
+}
+
task generatePom() {
inputs.file(new File(projectDir, "pom.tpl.xml"))
outputs.file(new File(buildDir, "pom.xml"))
@@ -58,14 +76,14 @@ task mergeClassOutputs doLast {
}
}
-task pluginDescriptor(type: CrossPlatformExec) {
+task pluginDescriptor(type: CrossPlatformExec, dependsOn: setupMaven) {
workingDir buildDir
commandLine mvn, '-e', '-B', 'org.apache.maven.plugins:maven-plugin-plugin:descriptor'
dependsOn mergeClassOutputs
}
-task helpMojo(type: CrossPlatformExec) {
+task helpMojo(type: CrossPlatformExec, dependsOn: setupMaven) {
workingDir buildDir
commandLine mvn, '-e', '-B', 'org.apache.maven.plugins:maven-plugin-plugin:helpmojo'