-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
107 lines (91 loc) · 2.47 KB
/
build.gradle
File metadata and controls
107 lines (91 loc) · 2.47 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
plugins {
id "java"
}
allprojects {
apply plugin: "java"
apply plugin: "maven-publish"
def retromcp_version = '1.2.1'
repositories {
mavenCentral()
maven {
url = "https://maven.fabricmc.net/"
content {
includeGroup "net.fabricmc"
}
}
maven { url = "https://mcphackers.org/libraries/" }
maven { url = "https://maven.glass-launcher.net/releases" }
maven {
url = "https://jitpack.io/"
content {
includeGroupByRegex "io\\.github\\..+"
includeGroupByRegex "com\\.github\\..+"
}
}
}
dependencies {
runtimeOnly sourceSets.test.output
// Required libraries
implementation libs.asm
implementation libs.asm.analysis
implementation libs.asm.commons
implementation libs.asm.tree
implementation libs.asm.util
implementation libs.rdi.nio
implementation libs.rdi
implementation libs.fernflower
implementation libs.json
implementation libs.diffpatch
implementation libs.commons.lang3
implementation libs.mapping.io
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
// Use release flag on Java 9+ instead of source & target flags
// This makes the JDK read the boot classpath and use the proper
// libraries to be compliant with Java 8 without issues
if (JavaVersion.current().isJava9Compatible()) {
it.options.release.set(8)
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
publishing {
publications {
maven(MavenPublication) {
groupId = 'org.mcphackers'
// Jank hack to have CLI and GUI be retromcp-cli and retromcp-gui
// while still keeping retromcp-java as the main artifact
artifactId = project.name.toLowerCase()
if (!artifactId.contains('retromcp-')) {
artifactId = 'retromcp-' + artifactId
}
version = retromcp_version
pom {
description = 'A rewrite of MCP to provide support for many versions of Minecraft which were never supported by original MCP.'
url = 'https://mcphackers.org'
licenses {
license {
name = 'The MIT License'
url = 'https://spdx.org/licenses/MIT.html'
}
}
scm {
connection = 'scm:git:[email protected]:MCPHackers/RetroMCP-Java.git'
developerConnection = connection
url = 'https://github.com/MCPHackers/RetroMCP-Java'
}
}
from components.java
}
}
}
tasks.withType(AbstractTestTask).configureEach {
failOnNoDiscoveredTests = false
}
}
subprojects {
apply plugin: "application"
}