-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
61 lines (51 loc) · 1.36 KB
/
build.gradle.kts
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
plugins {
kotlin("jvm") version "1.9.23"
kotlin("plugin.serialization") version "1.9.23"
application
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.15.0-Beta.1"
id("maven-publish")
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(8)
explicitApi()
}
application {
mainClass.set("MainKt")
}
/**
* Source for publishing source code
* https://stackoverflow.com/a/70677010/9636037
*/
tasks.register(
name = "androidReleaseSourcesJar",
type = Jar::class,
) {
archiveClassifier.set("sources")
from(kotlin.sourceSets["main"].kotlin.srcDirs)
}
project.afterEvaluate {
publishing {
publications {
create<MavenPublication>("release") {
groupId = "com.github.Abhimanyu14"
artifactId = "emoji-core"
version = "1.0.13"
// Publish both the main JAR and the sources JAR
from(components["kotlin"])
artifact(tasks.getByName("androidReleaseSourcesJar"))
}
}
}
}