This repository has been archived by the owner on Jan 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
/
build.gradle
152 lines (122 loc) · 4.15 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
buildscript {
ext.kotlin_version = '1.2.30'
ext.dokka_version = '0.9.16'
// ext.kotlin_version = '1.2.0-rc-39'
repositories {
maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
maven { url 'https://dl.bintray.com/kotlin/dokka' }
mavenCentral()
}
dependencies {
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${dokka_version}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins { id "com.jfrog.bintray" version "1.2" }
apply plugin: 'kotlin'
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'application'
apply plugin: 'maven'
apply plugin: 'maven-publish'
// not neeeded but does not work without
mainClassName = "de.mpicbg.scicomp.kutils.BashKt" // not needed but does not work without
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.apache.commons:commons-csv:1.3"
compile 'com.beust:klaxon:0.30'
// compile 'me.tongfei:progressbar:0.5.5'
compile 'org.jetbrains.kotlin:kotlin-reflect:1.2.30'
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile "io.kotlintest:kotlintest:2.0.7"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
}
repositories {
mavenCentral()
mavenLocal()
jcenter()
//todo remove
// maven { url 'https://dl.bintray.com/kotlin/kotlin-dev' }
}
//Minimal dokka configuration:
dokka {
outputFormat = 'html'
// outputDirectory = "$buildDir/javadoc"
outputDirectory = "docs/javadoc"
// sourceDirs = files('src/test/kotlin')
samples = ['src/test/kotlin/krangl/samples']
// Emit warnings about not documented members. Applies globally, also can be overridden by packageOptions
reportNotDocumented = false
// http://kotlinlang.org/docs/reference/kotlin-doc.html#module-and-package-documentation
includes = ['misc/packages_info.md']
}
// http://stackoverflow.com/questions/11474729/how-to-build-sources-jar-with-gradle
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
//http://stackoverflow.com/questions/34377367/why-is-gradle-install-replacing-my-version-with-unspecified
group 'de.mpicbg.scicomp'
version '0.7'
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar { classifier "sources" }
// just needed because artifact name differs from projet name
version = project.version
artifactId = 'krangl'
groupId = project.group
}
}
}
// https://docs.gradle.org/current/userguide/maven_plugin.html
//uploadArchives {
// repositories {
// mavenDeployer {
//// pom.groupId = 'de.mpicbg.scicomp'
//// pom.version = '0.1-SNAPSHOT'
//// pom.artifactId = 'kscript'
//
// repository(url: "file://localhost/tmp/myRepo/")
// }
// }
//}
//install {
// repositories.mavenInstaller {
// pom.version = project.version
//// pom.artifactId = 'kra'
// pom.groupId = project.group
// }
//}
if (hasProperty('bintray_user') && hasProperty('bintray_key')) {
bintray {
// property must be set in ~/.gradle/gradle.properties
user = bintray_user
key = bintray_key
publications = ['maven'] //When uploading configuration files
dryRun = false //Whether to run this as dry-run, without deploying
publish = true // If version should be auto published after an upload
pkg {
repo = 'mpicbg-scicomp'
name = 'krangl'
vcsUrl = 'https://github.com/holgerbrandl/krangl'
licenses = ['MIT']
publicDownloadNumbers = true
//Optional version descriptor
version {
name = project.version //Bintray logical version name
desc = '.'
released = new Date()
vcsTag = 'v' + project.version
}
}
}
}