-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
108 lines (96 loc) · 2.84 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
buildscript { scriptHandler ->
apply from: "$rootProject.rootDir/gradle/repositories.gradle", to: scriptHandler
ext.kotlin_version = '1.3.0'
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
}
}
plugins {
id 'pl.allegro.tech.build.axion-release' version '1.9.3'
id 'idea'
}
apply from: "$rootDir/gradle/kotlin.gradle"
apply from: "$rootDir/gradle/repositories.gradle"
apply from: "$rootDir/gradle/idea.gradle"
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
group 'io.github.atistrcsn'
jar.baseName 'kutils'
scmVersion {
versionCreator 'versionWithBranch'
tag.prefix = ''
}
version = scmVersion.version
println("Project git version: ${version}")
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.1"
implementation "io.github.microutils:kotlin-logging:1.5.9"
implementation "org.slf4j:slf4j-api:1.7.25"
testImplementation "org.jetbrains.kotlin:kotlin-test"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit"
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId group
artifactId module.name
version project.version
afterEvaluate {
artifact(sourcesJar) {
classifier = 'sources'
}
}
}
}
}
jar {
exclude("**/resources/rebel.xml")
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
bintray {
user = "${System.getenv("BINTRAY_USER")}"
key = "${System.getenv("BINTRAY_KEY")}"
publications = ['mavenJava']
pkg {
repo = 'public'
name = 'kutils'
desc = 'Kotlin starter, kotlin utilities'
licenses = ['MIT']
vcsUrl = 'https://github.com/atistrcsn/kutils.git'
labels = ['kotlin', 'utils']
publicDownloadNumbers = true
githubRepo = 'atistrcsn/kutils' //Optional Github repository
githubReleaseNotesFile = 'README.md' //Optional Github readme file
version {
name = project.version
desc = bintray.pkg.desc
released = new Date()
vcsTag = project.version
gpg {
sign = true
}
}
}
}
task cleanPubLocal() {
group 'kutils'
dependsOn 'clean'
dependsOn 'assemble'
dependsOn 'publishToMavenLocal'
tasks.findByName('assemble').mustRunAfter 'clean'
tasks.findByName('publishToMavenLocal').mustRunAfter 'assemble'
}
task publishToBintray() {
group 'kutils'
dependsOn 'cleanPubLocal'
dependsOn 'bintrayUpload'
tasks.findByName('bintrayUpload').mustRunAfter 'cleanPubLocal'
}