aboutsummaryrefslogtreecommitdiff
path: root/runners/fatjar/build.gradle
blob: 1da238414edfd565cd89b5f5f4ce9c367a5b73ba (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
import org.jetbrains.PluginXmlTransformer
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

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

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

jar {
    manifest {
        attributes 'Main-Class': 'org.jetbrains.dokka.MainKt'
    }
}

shadowJar {
    baseName = 'dokka-fatjar'
    classifier = ''
    configurations {
        exclude compileOnly
    }

    transform(ServiceFileTransformer)
    transform(PluginXmlTransformer)

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

    exclude 'src/**'

    relocate('kotlin.reflect.full', 'kotlin.reflect')
}

task apiShadow(type: ShadowJar) {
    baseName = 'dokka-fatapi'
    classifier = ''

    configurations = [project.configurations.compile]
    configurations {
        exclude compileOnly
    }

    transform(ServiceFileTransformer)
    transform(PluginXmlTransformer)

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

    exclude 'src/**'

    relocate('kotlin.reflect.full', 'kotlin.reflect')
}

apply plugin: 'maven-publish'

publishing {
    publications {
        dokkaFatJar(MavenPublication) { publication ->
            artifactId = 'dokka-fatjar'
            project.shadow.component(publication)
        }

        dokkaFatApi(MavenPublication) {publication ->
            artifactId = 'dokka-fatapi'
            publication.artifact(project.tasks.apiShadow)
        }
    }
}

bintrayPublication(project, ["dokkaFatJar"])