From 2bd7a4ac79bfa813a0c19bdcd417c44039b38480 Mon Sep 17 00:00:00 2001 From: Sergey Mashkov Date: Tue, 14 Jul 2015 17:27:47 +0300 Subject: Build fatjar by gradle and use it's output as dependency for maven and gradle plugins. Eliminate local repository in out dir. --- dokka-fatjar/build.gradle | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 dokka-fatjar/build.gradle (limited to 'dokka-fatjar/build.gradle') diff --git a/dokka-fatjar/build.gradle b/dokka-fatjar/build.gradle new file mode 100644 index 00000000..e7c9cd97 --- /dev/null +++ b/dokka-fatjar/build.gradle @@ -0,0 +1,53 @@ +group 'org.jetbrains.dokka' +version '0.0.1-SNAPSHOT' + +apply plugin: 'java' +apply plugin: 'maven-publish' + +dependencies { + compile 'org.fusesource.jansi:jansi:[1.11,2.0)' +} + +task wrapper(type: Wrapper) { + gradleVersion = '2.5' + distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip" +} + +task sourceJar(type: Jar) { + from fileTree('../src') +} + +jar { + manifest { + attributes "Implementation-Title": "Dokka Kotlin Documentation tool" + attributes "Implementation-Version": version + attributes "Main-Class" : "org.jetbrains.dokka.DokkaPackage" + } + + fileTree(project.file('../lib')).filter { it.name.endsWith('.jar') && !it.name.contains("-sources") }.each { + from (zipTree(it)) { + exclude 'META-INF/MANIFEST.MF' + exclude 'META-INF/*.SF' + exclude 'META-INF/*.DSA' + exclude 'META-INF/*.RSA' + } + } + from (zipTree(project.file('../out/dokka.jar'))) { + exclude 'META-INF/MANIFEST.MF' + exclude 'META-INF/*.SF' + exclude 'META-INF/*.DSA' + exclude 'META-INF/*.RSA' + } +} + +publishing { + publications { + maven(MavenPublication) { + from components.java + + artifact sourceJar { + classifier "sources" + } + } + } +} -- cgit