This repository has been archived by the owner on Jul 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·151 lines (127 loc) · 4.97 KB
/
build.gradle
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
buildscript {
def config = new Properties()
file('build.properties').withInputStream(config.&load)
project.ext.config = config
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
dependencies {
classpath group: 'com.github.johnrengelman', name: 'shadow', version: config.shadow_version, changing: true
}
}
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'maven-publish'
archivesBaseName = config.project_id
group = config.project_group
version = "${config.project_version}.${(System.getenv("CI_PIPELINE_IID") ?: 0)}"
sourceCompatibility = config.java_version
targetCompatibility = config.java_version
repositories {
mavenCentral()
google()
maven { url = 'https://maven.covers1624.net' }
maven { url = 'https://repo1.maven.org/maven2' }
}
dependencies {
implementation group: 'org.jetbrains', name: 'annotations', version: config.annotations_version, changing: true
implementation group: 'it.unimi.dsi', name: 'fastutil', version: config.fastutil_version, changing: true
implementation group: 'org.fusesource.jansi', name: 'jansi', version: config.jansi_version, changing: true
implementation group: 'net.sf.jopt-simple', name: 'jopt-simple', version: config.jopt_version, changing: true
implementation group: 'org.antlr', name: 'antlr4-runtime', version: config.antlr_version, changing: true
implementation group: 'org.apiguardian', name: 'apiguardian-api', version: config.apiguard_version, changing: true
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: config.jackson_version, changing: true
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: config.jackson_version, changing: true
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: config.jackson_version, changing: true
implementation group: 'io.karma.kommons', name: 'kommons', version: config.kommons_version, changing: true
implementation group: 'io.karma.ferrous', name: 'antlr-frontend', version: config.antlr_frontend_version
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: config.junit_version, changing: true
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: config.junit_version, changing: true
}
test {
jvmArgs '-Xms256M'
jvmArgs '-Xmx512M'
useJUnitPlatform()
}
def commonManifest = {
attributes([
'Main-Class' : "${config.project_group}.Main",
'Implementation-Title' : 'Osmium',
'Implementation-Version': project.version,
'Implementation-Vendor' : 'Karma Krafts',
'Specification-Title' : 'Osmium',
'Specification-Version' : 1,
'Specification-Vendor' : 'Karma Krafts'
])
}
jar {
archiveClassifier = 'slim'
manifest commonManifest
}
shadowJar {
archiveClassifier = ''
manifest commonManifest
}
artifacts {
archives jar
archives shadowJar
}
tasks.withType(Jar) {
includeEmptyDirs = false
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs << "--enable-preview"
sourceCompatibility = config.java_version
targetCompatibility = config.java_version
}
publishing {
repositories {
if (System.getenv('MAVEN_PASSWORD')) {
maven {
url "https://nexus.covers1624.net/repository/karmakrafts-releases/"
credentials {
username 'kitsunealex'
password System.getenv('MAVEN_PASSWORD')
}
}
}
}
publications {
manganese(MavenPublication) {
groupId config.artifact_group
artifactId project.archivesBaseName
version project.version
artifact jar
artifact shadowJar
pom {
name = archivesBaseName
description = archivesBaseName
//The publish plugin doesnt like GString's here apparently..
url = "https://git.karmakrafts.dev/kk/${config.project_id}".toString()
scm {
url = "https://git.karmakrafts.dev/kk/${config.project_id}".toString()
}
issueManagement {
system = 'gitlab'
url = "https://git.karmakrafts.dev/kk/${config.project_id}/issues".toString()
}
licenses {
license {
name = "The MIT License"
url = "https://git.karmakrafts.dev/kk/${config.project_id}/-/blob/master/LICENSE"
distribution = 'repo'
}
}
developers {
developer {
id = 'kitsunealex'
name = 'KitsuneAlex'
}
}
}
}
}
}