forked from Guardsquare/proguard-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
105 lines (93 loc) · 2.61 KB
/
build.gradle
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
plugins {
id 'distribution'
id 'io.github.gradle-nexus.publish-plugin'
id 'signing'
id "org.jetbrains.kotlin.jvm" version "$kotlinVersion" apply false
id 'com.adarshr.test-logger' version '3.0.0' apply false
id 'de.jansauer.printcoverage' version '2.0.0' apply false
id "org.sonarqube" version "3.4.0.2513"
id "io.freefair.aggregate-javadoc" version "6.5.0.3"
id "org.jlleitschuh.gradle.ktlint" version "10.3.0" apply false
}
allprojects {
group = 'com.guardsquare'
version = proguardCoreVersion
repositories {
mavenCentral()
google()
}
pluginManager.withPlugin('java') {
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
withJavadocJar()
withSourcesJar()
}
javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs = ["-opt-in=kotlin.RequiresOptIn"]
}
}
}
aggregateJavadoc {
title = 'ProGuardCORE'
destinationDir = file('docs/md/api')
options.addStringOption('Xdoclint:none', '-quiet')
}
task buildDocumentation(type: Exec) {
dependsOn aggregateJavadoc
inputs.dir 'docs/md'
inputs.file 'docs/mkdocs.yml'
outputs.dir 'docs/html'
executable 'sh'
args '-c', "docker run --volume $rootDir/docs:/docs --rm squidfunk/mkdocs-material:5.2.2 build"
}
clean {
delete aggregateJavadoc.outputs
//delete buildDocumentation.outputs
}
distributions {
main {
distributionBaseName.set('proguard-core')
contents {
into('lib') {
from tasks.getByPath(":proguard-core:jar").outputs
}
into('docs') {
from('docs/md') {
includeEmptyDirs = false
include '**/*.md'
}
}
from(rootDir) {
include 'examples/'
exclude 'examples/build'
exclude 'examples/.gradle'
exclude 'examples/.idea'
include 'LICENSE'
}
}
}
}
distTar {
compression = Compression.GZIP
archiveExtension.set('tar.gz')
dependsOn('aggregateJavadoc')
}
distZip {
dependsOn('aggregateJavadoc')
}
nexusPublishing {
repositories {
sonatype {
username = findProperty('PROGUARD_STAGING_USERNAME')
password = findProperty('PROGUARD_STAGING_PASSWORD')
}
}
}