aboutsummaryrefslogtreecommitdiff
path: root/runners/maven-plugin/build.gradle
diff options
context:
space:
mode:
authorPaweł Marks <pmarks@virtuslab.com>2020-07-17 16:36:09 +0200
committerPaweł Marks <pmarks@virtuslab.com>2020-07-17 16:36:09 +0200
commit6996b1135f61c7d2cb60b0652c6a2691dda31990 (patch)
treed568096c25e31c28d14d518a63458b5a7526b896 /runners/maven-plugin/build.gradle
parentde56cab76f556e5b4af0b8c8cb08d8b482b86d0a (diff)
parent1c3530dcbb50c347f80bef694829dbefe89eca77 (diff)
downloaddokka-6996b1135f61c7d2cb60b0652c6a2691dda31990.tar.gz
dokka-6996b1135f61c7d2cb60b0652c6a2691dda31990.tar.bz2
dokka-6996b1135f61c7d2cb60b0652c6a2691dda31990.zip
Merge branch 'dev-0.11.0'
Diffstat (limited to 'runners/maven-plugin/build.gradle')
-rw-r--r--runners/maven-plugin/build.gradle161
1 files changed, 0 insertions, 161 deletions
diff --git a/runners/maven-plugin/build.gradle b/runners/maven-plugin/build.gradle
deleted file mode 100644
index 76fab68d..00000000
--- a/runners/maven-plugin/build.gradle
+++ /dev/null
@@ -1,161 +0,0 @@
-import groovy.io.FileType
-import org.jetbrains.CorrectShadowPublishing
-import org.jetbrains.CrossPlatformExec
-
-import java.nio.file.Files
-import java.nio.file.StandardCopyOption
-
-apply plugin: 'kotlin'
-apply plugin: 'com.github.johnrengelman.shadow'
-
-sourceCompatibility = 1.8
-
-tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
- kotlinOptions {
- freeCompilerArgs += "-Xjsr305=strict"
- languageVersion = "1.2"
- apiVersion = languageVersion
- jvmTarget = "1.8"
- }
-}
-
-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"
- shadow "org.apache.maven:maven-plugin-api:$maven_version"
- shadow "org.apache.maven:maven-archiver:$maven_archiver_version"
- 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"
-}
-
-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"
-}
-
-def mavenBuildDir = "$buildDir/maven"
-
-
-sourceSets.main.resources {
- srcDirs += "$mavenBuildDir/classes/java/main"
- exclude "**/*.class"
-}
-
-task generatePom() {
- inputs.file(new File(projectDir, "pom.tpl.xml"))
- outputs.file(new File(mavenBuildDir, "pom.xml"))
- doLast {
- final pomTemplate = new File(projectDir, "pom.tpl.xml")
- final pom = new File(mavenBuildDir, "pom.xml")
- pom.parentFile.mkdirs()
- pom.text = pomTemplate.text.replace("<version>dokka_version</version>", "<version>$dokka_version</version>")
- .replace("<maven.version></maven.version>", "<maven.version>$maven_version</maven.version>")
- .replace("<version>maven-plugin-plugin</version>", "<version>$maven_plugin_tools_version</version>")
- }
-}
-//
-//task mergeClassOutputs doLast {
-// def sourceDir = new File(buildDir, "classes/kotlin")
-// def targetDir = new File(buildDir, "classes/java")
-//
-// sourceDir.eachFileRecurse FileType.ANY, {
-// def filePath = it.toPath()
-// def targetFilePath = targetDir.toPath().resolve(sourceDir.toPath().relativize(filePath))
-// if (it.isFile()) {
-// Files.move(filePath, targetFilePath, StandardCopyOption.REPLACE_EXISTING)
-// } else if (it.isDirectory()) {
-// targetFilePath.toFile().mkdirs()
-// }
-// }
-//}
-
-
-
-task syncKotlinClasses(type: Sync, dependsOn: compileKotlin) {
- from "$buildDir/classes/kotlin"
- into "$mavenBuildDir/classes/java"
-
- preserve {
- include '**/*.class'
- }
-}
-
-task syncJavaClasses(type: Sync, dependsOn: compileJava) {
- from "$buildDir/classes/java"
- into "$mavenBuildDir/classes/java"
-
- preserve {
- include '**/*.class'
- }
-}
-
-task helpMojo(type: CrossPlatformExec, dependsOn: setupMaven) {
- workingDir mavenBuildDir
- commandLine mvn, '-e', '-B', 'org.apache.maven.plugins:maven-plugin-plugin:helpmojo'
-
- dependsOn syncKotlinClasses
-}
-
-
-task pluginDescriptor(type: CrossPlatformExec, dependsOn: setupMaven) {
- workingDir mavenBuildDir
- commandLine mvn, '-e', '-B', 'org.apache.maven.plugins:maven-plugin-plugin:descriptor'
-
- dependsOn syncJavaClasses
-}
-
-
-//mergeClassOutputs.dependsOn compileKotlin
-//helpMojo.dependsOn mergeClassOutputs
-helpMojo.dependsOn generatePom
-sourceSets.main.java.srcDir("$buildDir/maven/generated-sources/plugin")
-compileJava.dependsOn helpMojo
-processResources.dependsOn pluginDescriptor
-
-pluginDescriptor.dependsOn generatePom
-
-shadowJar {
- baseName = 'dokka-maven-plugin'
- classifier = ''
-}
-
-shadowJar.dependsOn pluginDescriptor
-
-
-task sourceJar(type: Jar) {
- from sourceSets.main.allSource
-}
-
-apply plugin: 'maven-publish'
-
-publishing {
- publications {
- dokkaMavenPlugin(MavenPublication) { MavenPublication publication ->
- artifactId = 'dokka-maven-plugin'
-
- artifact sourceJar {
- classifier "sources"
- }
-
- CorrectShadowPublishing.configure(publication, project)
- }
- }
-}
-
-bintrayPublication(project, ['dokkaMavenPlugin'])