This repository has been archived by the owner on Mar 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
96 lines (84 loc) · 2.58 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
plugins {
id 'java'
id 'idea'
id 'maven-publish'
id 'application'
// id 'com.github.johnrengelman.shadow' version '6.1.0'
}
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
group 'io.github.over-run'
archivesBaseName = 'mc2d'
version '0.6.0-SNAPSHOT'
repositories {
mavenCentral()
maven { url 'https://maven.aliyun.com/repository/central' }
// temporary maven repositories
maven { url 'https://s01.oss.sonatype.org/content/repositories/releases' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
implementation 'com.google.code.gson:gson:2.10'
// implementation 'com.google.guava:guava:30.1-jre'
implementation 'org.apache.logging.log4j:log4j-core:2.19.0'
implementation 'org.apache.logging.log4j:log4j-slf4j18-impl:2.18.0'
implementation 'org.joml:joml:1.10.5'
implementation 'io.github.over-run:swgl-core:0.2.0-SNAPSHOT'
compileOnly 'org.jetbrains:annotations:23.0.0'
// Lwjgl runtime libraries
for (String depend in ['', '-glfw', '-opengl', '-stb', '-jemalloc']) {
for (String platform in [
'linux-arm32', 'linux-arm64', 'linux',
// 'macos-arm64', 'macos',
'windows-arm64', 'windows-x86', 'windows'
]) {
runtimeOnly "org.lwjgl:lwjgl$depend::natives-$platform"
}
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
application {
mainClass = 'io.github.overrun.mc2d.Main'
}
jar {
from 'LICENSE'
manifest.attributes('Main-Class': 'io.github.overrun.mc2d.Main',
'Specification-Title': 'mc2d',
'Specification-Vendor': 'Overrun Organization',
'Specification-Version': archiveVersion,
'Implementation-Title': 'Minecraft2D',
'Implementation-Vendor': 'Overrun Organization',
'Implementation-Version': archiveVersion,
'Multi-Release': true)
}
//shadowJar {
// from 'LICENSE'
//}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set 'sources'
from sourceSets.main.allSource, 'LICENSE'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set 'javadoc'
from javadoc, 'LICENSE'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact(jar) {
builtBy jar
}
artifact(sourcesJar) {
builtBy sourcesJar
}
artifact(javadocJar) {
builtBy javadocJar
}
}
}
repositories {
mavenLocal()
}
}
idea.module.inheritOutputDirs = true