This repository has been archived by the owner on Apr 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
155 lines (136 loc) · 4.63 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
buildscript {
ext {
kotlin_version = '1.4.0'
bintray_version = '1.8.1'
}
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$bintray_version"
classpath "com.github.jengelman.gradle.plugins:shadow:5.1.0"
}
}
plugins {
id "io.gitlab.arturbosch.detekt" version "1.9.0"
}
repositories {
jcenter()
}
ext {
lib_version = System.getenv("RELEASE_TAG") ?: System.getenv("GITHUB_SHA") ?: System.getenv("VERSION") ?: "undefined"
lib_group = 'com.gitlab.kordlib.kordx'
coroutines_version = '1.3.9'
koin_version = '2.1.6'
junit_version = '5.6.0'
mockk_version = '1.10.0'
kotlin_logging_version = '1.8.3'
log4j_version = '1.7.26'
}
group lib_group
version lib_version
subprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'kotlinx-serialization'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'kotlin-kapt'
apply plugin: 'io.gitlab.arturbosch.detekt'
repositories {
mavenCentral()
jcenter()
maven { url "https://kotlin.bintray.com/kotlinx" }
maven { url "https://dl.bintray.com/kordlib/Kord" }
}
dependencies {
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
api "io.github.microutils:kotlin-logging:$kotlin_logging_version"
testImplementation "io.mockk:mockk-dsl-jvm:$mockk_version"
testImplementation "io.mockk:mockk:$mockk_version"
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit5:$kotlin_version"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version"
testRuntimeOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
testRuntimeOnly "org.slf4j:slf4j-simple:$log4j_version"
implementation "com.squareup:kotlinpoet:1.4.1"
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = [
"-XXLanguage:+InlineClasses",
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-Xopt-in=kotlin.Experimental"
]
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = [
"-XXLanguage:+InlineClasses",
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-Xopt-in=kotlin.Experimental"
]
}
}
test {
useJUnitPlatform {
includeEngines 'junit-jupiter'
}
}
task sourcesJar(type: Jar) {
archiveClassifier.set 'sources'
from sourceSets.main.allSource
}
archivesBaseName = project.name
publishing {
publications {
Commands(MavenPublication) {
from components.kotlin
groupId lib_group
artifactId archivesBaseName
version lib_version
artifact sourcesJar
pom.withXml {
def root = asNode()
root.dependencies.removeAll { dep ->
dep.scope == "test"
}
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['Commands']
publish = true
pkg {
repo = 'Kord'
name = 'kordx.commands'
userOrg = 'kordlib'
licenses = ['MIT']
vcsUrl = 'https://gitlab.com/kordlib/kordx.commands.git'
websiteUrl = 'https://gitlab.com/kordlib/kordx.commands'
issueTrackerUrl = 'https://gitlab.com/kordlib/kordx.commands/issues'
version {
name = lib_version
desc = "Command library for Kotlin"
released = new Date()
vcsTag = lib_version
}
}
}
}