-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
122 lines (102 loc) · 3.65 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.8.20"
id("org.jetbrains.compose") version "1.4.0"
`maven-publish`
`java-library`
}
allprojects {
group = "com.heroslender"
version = "0.1.0-SNAPSHOT"
repositories {
mavenCentral()
}
}
subprojects {
apply {
plugin("org.jetbrains.kotlin.jvm")
plugin("org.jetbrains.compose")
plugin("org.gradle.maven-publish")
}
repositories {
google()
maven("https://nexus.heroslender.com/repository/maven-public/")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
dependencies {
compileOnly(kotlin("stdlib-jdk8"))
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
// Custom minimized fastutil dep made using `./find-deps.sh`
implementation("it.unimi.dsi:fastutil-min:8.5.11-HMF")
// Shaded
api(compose.runtime) {
exclude("org.jetbrains.kotlin")
exclude("org.jetbrains.kotlinx")
}
testImplementation(platform("org.junit:junit-bom:5.7.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
java {
withJavadocJar()
withSourcesJar()
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
}
tasks {
test{
useJUnitPlatform()
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
}
publishing {
repositories {
maven {
val target = if (project.version.toString().endsWith("-SNAPSHOT"))
"https://nexus.heroslender.com/repository/maven-snapshots/"
else
"https://nexus.heroslender.com/repository/maven-releases/"
name = "heroslender-nexus"
url = uri(target)
credentials {
username = project.findProperty("nexus.user") as? String
?: System.getenv("NEXUS_USERNAME")
password = project.findProperty("nexus.key") as? String
?: System.getenv("NEXUS_PASSWORD")
}
}
}
publications {
create<MavenPublication>("maven") {
artifactId = project.path.replace(":", "hmf-").removeSuffix("-").lowercase()
groupId = project.group.toString()
version = project.version.toString()
from(components["java"])
pom {
name.set(project.name)
description.set(project.description)
url.set("https://github.com/heroslender/menu-framework")
licenses {
license {
name.set("MIT License")
url.set("https://github.com/heroslender/menu-framework/blob/main/LICENSE")
}
}
developers {
developer {
id.set("heroslender")
name.set("Bruno Martins")
email.set("[email protected]")
}
}
scm {
connection.set("https://github.com/heroslender/menu-framework.git")
developerConnection.set("[email protected]:heroslender/menu-framework.git")
url.set("https://github.com/heroslender/menu-framework")
}
}
}
}
}
}