forked from meltwater/kotlin-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
171 lines (143 loc) · 4.22 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
import static java.lang.System.getenv
buildscript {
ext.kotlin_version = '1.2.31'
repositories {
jcenter()
maven { url "https://dl.bintray.com/kotlin/dokka" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.9.16'
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4+"
}
}
plugins {
id "com.jfrog.bintray" version "1.8.0"
}
task ('wrapper', type:Wrapper) {
gradleVersion = '4.6'
}
project.group = 'com.meltwater.docker'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: "maven-publish"
apply plugin: 'kotlin'
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'groovy'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.jfrog.artifactory'
sourceCompatibility = 1.8
repositories {
jcenter()
}
dependencies {
compile "org.slf4j:slf4j-api:1.7.12"
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "com.fasterxml.jackson.core:jackson-core:2.8.10"
compile "com.fasterxml.jackson.core:jackson-databind:2.8.10"
compile "org.apache.commons:commons-lang3:3.7"
compile "commons-io:commons-io:2.6"
compile "org.apache.maven:maven-artifact:3.0.5"
testCompile 'org.spockframework:spock-core:1.1-groovy-2.4'
testCompile 'ch.qos.logback:logback-classic:1.2.3'
}
task version() {
println project.version
}
dokka {
includes = ['Module.md']
linkMapping {
dir = "src/main/kotlin"
url = "https://github.com/meltwater/kotlin-compose"
suffix = "#L"
}
}
task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'javadoc'
outputDirectory = javadoc.destinationDir
inputs.dir 'src/main/kotlin'
}
task javadocJar(type: Jar, dependsOn: dokkaJavadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
classifier "sources"
}
def pomConfig = {
licenses {
license {
name 'MIT License'
url 'http://www.opensource.org/licenses/mit-license.php'
distribution 'repo'
}
}
scm {
url 'https://github.com/meltwater/kotlin-compose'
connection 'scm:git:git://github.com/meltwater/kotlin-compose.git'
developerConnection 'scm:git:[email protected]:meltwater/kotlin-compose.git'
}
developers {
developer {
name 'Meltwater Team Horace'
email '[email protected]'
id 'meltwater/horace'
}
}
}
publishing {
publications {
JavaArtifacts(MavenPublication) {
from components.java
artifact sourceJar
artifact javadocJar
groupId project.group
artifactId project.name
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', 'Docker-compose wrapper for the JVM')
root.appendNode('name', project.name)
root.appendNode('url', 'https://github.com/meltwater/kotlin-compose')
root.children().last() + pomConfig
}
}
}
}
artifactory {
contextUrl = 'https://meltwater.jfrog.io/meltwater'
publish {
repository {
repoKey = 'team-horace'
username = System.getProperty("artifactory_user")
password = System.getProperty("artifactory_password")
maven = true
}
defaults {
publishConfigs('archives', 'artifacts')
}
}
}
bintray {
user = getenv('BINTRAY_USER')
key = getenv('BINTRAY_KEY')
publications = ['JavaArtifacts']
publish = true
pkg {
repo = 'opensource'
name = project.name
userOrg = 'meltwater'
licenses = ['MIT']
vcsUrl = "https://github.com/meltwater/${project.name}"
version {
gpg {
sign = true
}
released = new Date()
}
}
}