-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
49 lines (42 loc) · 1.38 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
plugins {
kotlin("jvm") version "1.7.10" apply false
}
allprojects {
group = "io.github.nickacpt.patchify"
version = "2.1.0-SNAPSHOT"
}
arrayOf("core", "cli", "gradle-plugin").forEach { name ->
project(name) {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "java-library")
apply(plugin = "maven-publish")
this.repositories {
mavenCentral()
}
this.dependencies {
/* Kotlin std-lib */
"implementation"(kotlin("stdlib-jdk8"))
}
val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by this.tasks
compileKotlin.kotlinOptions {
jvmTarget = "1.8"
}
this.extensions.getByType<PublishingExtension>().apply {
repositories {
val lightCraftRepoDir = project.findProperty("lightcraft.repo.location")
if (lightCraftRepoDir != null) {
maven {
this.name = "OrionCraftRepo"
this.url = File(lightCraftRepoDir.toString()).toURI()
}
}
}
publications {
create<MavenPublication>("mavenJava") {
this.from(components["java"])
this.artifactId = "patchify-${project.name}"
}
}
}
}
}