forked from CadixDev/Atlas
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
114 lines (96 loc) · 3.19 KB
/
build.gradle.kts
File metadata and controls
114 lines (96 loc) · 3.19 KB
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
plugins {
id("com.google.cloud.artifactregistry.gradle-plugin") version "2.2.5"
id("java")
id("maven-publish")
}
val javaVersion: String by project
val asmVersion: String by project
val bombeVersion: String by project
java {
sourceCompatibility = JavaVersion.toVersion(javaVersion)
targetCompatibility = JavaVersion.toVersion(javaVersion)
}
group = "org.cadixdev"
project.setProperty("archivesBaseName", project.name.toLowerCase())
version = "0.3.1-SNAPSHOT"
repositories {
mavenCentral()
maven {
url = uri("artifactregistry://us-central1-maven.pkg.dev/mw-lunarclient-maven-repo/public")
}
}
dependencies {
implementation("org.ow2.asm:asm-commons:$asmVersion")
implementation("org.cadixdev:bombe:$bombeVersion")
implementation("org.cadixdev:bombe-jar:$bombeVersion")
}
tasks.processResources {
from("LICENSE.txt")
}
tasks.register<Jar>("javadocJar") {
dependsOn("javadoc")
from(tasks.javadoc.get().destinationDir)
archiveClassifier.set("javadoc")
}
tasks.register<Jar>("sourcesJar") {
dependsOn("classes")
from(sourceSets.main.get().allSource)
archiveClassifier.set("sources")
}
tasks.jar {
manifest {
attributes("Automatic-Module-Name" to "${project.group}.atlas")
}
}
artifacts {
archives(tasks.named("javadocJar"))
archives(tasks.named("sourcesJar"))
}
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = project.property("archivesBaseName").toString()
from(components["java"])
artifact(tasks["javadocJar"])
artifact(tasks["sourcesJar"])
pom {
name.set(project.name)
description.set(project.description)
packaging = "jar"
url.set(project.property("url").toString())
inceptionYear.set(project.property("inceptionYear").toString())
scm {
url.set("https://github.com/CadixDev/Atlas")
connection.set("scm:git:https://github.com/CadixDev/Atlas.git")
developerConnection.set("scm:git:git@github.com:CadixDev/Atlas.git")
}
issueManagement {
system.set("GitHub")
url.set("https://github.com/CadixDev/Atlas/issues")
}
licenses {
license {
name.set("Mozilla Public License 2.0")
url.set("https://opensource.org/licenses/MPL-2.0")
distribution.set("repo")
}
}
developers {
developer {
id.set("jamierocks")
name.set("Jamie Mansfield")
email.set("jmansfield@cadixdev.org")
url.set("https://www.jamiemansfield.me/")
timezone.set("Europe/London")
}
}
}
}
}
repositories {
maven {
name = "artifactRegistry"
url = uri("artifactregistry://us-central1-maven.pkg.dev/mw-lunarclient-maven-repo/public")
}
}
}