-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
80 lines (69 loc) · 2.18 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
plugins {
id 'java'
id 'idea'
}
group 'org.funnydevelopers'
version '0.1.0-SNAPSHOT'
repositories {
mavenCentral()
// temporary maven repository
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/releases' }
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
implementation 'io.github.xenfork:fe2d:0.1.0-SNAPSHOT'
for (String depend in ['', '-glfw', '-opengl', '-stb', '-jemalloc']) {
runtimeOnly "org.lwjgl:lwjgl$depend::natives-windows"
}
implementation 'org.slf4j:slf4j-simple:2.0.6'
compileOnly 'org.jetbrains:annotations:23.1.0'
}
def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
options.encoding 'UTF-8'
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
}
archivesBaseName = 'mvzje'
withJavadocJar()
withSourcesJar()
}
jar {
from 'LICENSE'
manifest {
attributes 'Main-Class': 'org.funnydevelopers.mvzje.client.main.Main',
'Specification-Title': archiveBaseName,
'Specification-Vendor': 'Funny Developers',
'Specification-Version': '0',
'Implementation-Title': 'MvZ JE',
'Implementation-Vendor': 'Funny Developers',
'Implementation-Version': archiveVersion
}
}
javadoc {
failOnError = false
options.encoding 'UTF-8'
options.charSet 'UTF-8'
options.author true
options.locale 'en_US'
options.links "https://docs.oracle.com/en/java/javase/$sourceCompatibility/docs/api/"
options.windowTitle "MvZ JE ${project.version} Javadoc"
}
sourcesJar {
dependsOn classes
archiveClassifier.set 'sources'
from sourceSets.main.allSource, 'LICENSE'
}
javadocJar {
dependsOn javadoc
archiveClassifier.set 'javadoc'
from javadoc, 'LICENSE'
}
idea.module.inheritOutputDirs = true