aboutsummaryrefslogtreecommitdiff
path: root/runners/fatjar/build.gradle
blob: df20c9b9f9a14effd7f51de91dd2e2f0f0cf2731 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
import org.jetbrains.PluginXmlTransformer

apply plugin: 'com.github.johnrengelman.shadow'

dependencies {
    compile project(":runners:cli")
    compile project(":runners:ant")
}

shadowJar {
    baseName = 'dokka-fatjar'
    classifier = ''

    configurations {
        exclude provided
    }

    relocate('com.', 'dokkacom.') {
        exclude 'com.sun.**'
    }

    relocate('org.', 'dokkaorg.') {
        exclude 'org.jetbrains.dokka.**'
        exclude 'org.xml.**'
        exclude 'org.w3c.**'
        exclude 'org.jaxen.**'
        exclude 'org.apache.xerces.**'
        exclude 'org.apache.xml.**'
        exclude 'org.fusesource.jansi.**'
        exclude 'org.apache.tools.ant.**'
    }


    relocate('kotlin.', 'dokkakotlin.') {
        exclude '**.*kotlin_builtins' //For kotlin_builtins, still not sure that we should relocate kotlin stdlib
        exclude 'kotlin.reflect' /* WAT? Ok, ok. Relocate works as Ctrl + Shift + R for ALL class files, so,
        if you have string "kotlin.reflect", it will be rewritten to not relevant "dokkakotlin.reflect" and you will got
        builtins crash in runtime, cause could not find dokkakotlin/reflect/reflect.kotlin_builtins */
    }

    transform(ServiceFileTransformer)
    transform(PluginXmlTransformer)

    exclude 'colorScheme/**'
    exclude 'fileTemplates/**'
    exclude 'inspectionDescriptions/**'
    exclude 'intentionDescriptions/**'
}

apply plugin: 'maven-publish'

publishing {
    publications {
        dokkaFatJar(MavenPublication) {
            from components.shadow
            artifactId = 'dokka-fatjar'
        }
    }
}

bintrayPublication(project, ["dokkaFatJar"])