This repository has been archived by the owner on May 26, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
102 lines (89 loc) · 2.86 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
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
import org.jetbrains.compose.compose
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.6.10"
id("org.jetbrains.compose") version "1.1.1"
`java-library`
`maven-publish`
jacoco
signing
}
group = "io.github.app-outlet"
version = "1.0.2"
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = "karavel"
from(components["java"])
pom {
name.set("Karavel")
description.set("Lightweight navigation library for Compose for Desktop")
url.set("https://github.com/app-outlet/karavel")
licenses {
license {
name.set("MIT License")
url.set("https://github.com/app-outlet/karavel/blob/main/LICENSE")
}
}
developers {
developer {
id.set("messiaslima")
name.set("Messias Junior")
email.set("messiaslima.03@gmail.com")
}
}
scm {
connection.set("scm:git:git://github.com/app-outlet/karavel.git")
developerConnection.set("scm:git:ssh://github.com/app-outlet/karavel.git")
url.set("https://github.com/app-outlet/karavel")
}
}
}
}
repositories {
maven {
val releasesRepoUrl = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
val snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
name = "OSSRH"
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
}
}
signing {
useInMemoryPgpKeys(
System.getenv("GPG_KEY_ID"),
System.getenv("GPG_SECRET_KEY"),
System.getenv("GPG_PASSWORD")
)
sign(publishing.publications["maven"])
}
tasks.javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
repositories {
jcenter()
mavenCentral()
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
}
dependencies {
testImplementation(kotlin("test-junit5"))
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
implementation(compose.desktop.currentOs)
}