-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
90 lines (74 loc) · 1.94 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
buildscript {
ext.kotlin_version = '1.1.3'
ext.dokka_version = '0.9.13'
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${dokka_version}"
}
}
plugins {
id 'com.jfrog.bintray' version '1.7'
}
apply plugin: 'kotlin'
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'maven-publish'
def _group = 'com.importre'
def _artifact = 'kotlin-unwrap'
def _version = '0.3.2'
def _githubUrl = 'https://github.com/importre/kotlin-unwrap'
group _group
version _version
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testCompile 'junit:junit:4.12'
}
repositories {
jcenter()
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
task javadocJar(type: Jar, dependsOn: 'dokka') {
classifier = 'javadoc'
from "$buildDir/dokka"
}
task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'javadoc'
}
publishing {
publications {
KotlinUnwrapPublish(MavenPublication) {
from components.java
groupId _group
artifactId _artifact
version _version
artifact javadocJar
}
}
}
bintray {
user = project.hasProperty("user") ? project.user : ""
key = project.hasProperty("key") ? project.key : ""
publications = ['KotlinUnwrapPublish']
publish = true
// dryRun = true
pkg {
repo = 'maven'
name = _artifact
licenses = ['Apache-2.0']
vcsUrl = "${_githubUrl}.git"
publicDownloadNumbers = true
version {
name = _version
vcsTag = _version
gpg {
sign = true
passphrase = project.hasProperty("passphrase") ? project.passphrase : ""
}
}
}
}