-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
71 lines (61 loc) · 1.57 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
62
63
64
65
66
67
68
69
70
71
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.8.10"
id("maven-publish")
}
group = "org.magicghostvu"
version = "1.0"
repositories {
mavenCentral()
}
//
dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2")
implementation("org.slf4j:slf4j-api:1.7.36")
//runtimeOnly("ch.qos.logback:logback-classic:1.2.11")
//testImplementation(kotlin("test"))
}
/*tasks.test {
useJUnitPlatform()
}*/
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs = listOf(
"-opt-in=kotlin.RequiresOptIn",
"-Xno-call-assertions",
"-Xno-receiver-assertions",
"-Xno-param-assertions"
)
}
/*tasks.create<Jar>("source_jar") {
dependsOn("classes")
archiveClassifier.set("source")
from(sourceSets["main"].allSource)
}*/
java {
withSourcesJar()
//withJavadocJar()
}
publishing {
repositories {
maven {
credentials(HttpHeaderCredentials::class.java) {
name = "Private-Token"
value = project.properties.getValue("deploy.token") as String
}
url = uri("")
authentication {
create<HttpHeaderAuthentication>("header")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = "org.m.magicghostvu"
artifactId = "actor-kt"
version = "0.1.2-SNAPSHOT"
from(components["kotlin"])
artifact(tasks["sourcesJar"])
}
}
}