This repository was archived by the owner on May 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
107 lines (89 loc) · 2.53 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
import org.jetbrains.dokka.gradle.DokkaTask
buildscript {
ext.kotlin_version = '1.1.51'
ext.dokka_version = '0.9.10'
ext.bintray_version = '1.7.3'
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$bintray_version"
}
}
apply plugin: 'kotlin'
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
group 'com.github.rs3vans.krypto'
version '2.0.0'
repositories {
jcenter()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
testCompile 'org.hamcrest:hamcrest-core:1.3'
testCompile 'junit:junit:4.2'
testCompile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
}
dokka {
linkMapping {
dir = 'src/main/kotlin'
url = 'https://github.com/rs3vans/krypto/master/tree/src/main/kotlin'
suffix = '#L'
}
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
publications = ['KryptoPublication']
pkg {
repo = 'maven'
name = 'krypto'
userOrg = user
licenses = ['MIT']
vcsUrl = 'https://github.com/rs3vans/krypto.git'
version {
name = project.version
desc = 'Krypto - ' + project.version
vcsTag = project.version
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.3'
}
task dokkaDoc(type: DokkaTask) {
outputFormat = 'html'
outputDirectory = "docs"
}
task dokkaJavadoc(type: DokkaTask) {
outputFormat = 'javadoc'
outputDirectory = "$buildDir/javadoc"
}
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
classifier = 'sources'
}
task dokkaJar(type: Jar, dependsOn: dokkaJavadoc) {
from dokkaJavadoc.outputDirectory
classifier = 'javadoc'
}
artifacts {
archives sourcesJar, dokkaJar
}
assemble.dependsOn dokkaDoc
publishing {
publications {
KryptoPublication(MavenPublication) {
from components.java
groupId 'com.github.rs3vans.krypto'
artifactId 'krypto'
version project.version
artifact sourcesJar
artifact dokkaJar
}
}
}