Skip to content

Commit 14ebec2

Browse files
committed
update to gen2
1 parent 8b9420f commit 14ebec2

62 files changed

Lines changed: 434 additions & 464 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 1.1.0
2+
3+
- port to Ornithe Gen2
4+
15
### 1.0.0
26

37
- initial release

build.gradle

Lines changed: 0 additions & 156 deletions
This file was deleted.

build.gradle.kts

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
plugins {
2+
java
3+
id("net.fabricmc.fabric-loom-remap") version "1.15.+"
4+
id("ploceus") version "1.15.+"
5+
`maven-publish`
6+
id("com.modrinth.minotaur") version "2.+"
7+
id("io.freefair.lombok") version "9.+"
8+
id("dev.yumi.gradle.licenser") version "1.0.+"
9+
}
10+
11+
var featherBuild = "1"
12+
var fabricLoader = "0.19.1"
13+
var client = "3.1.10-beta.1"
14+
var config = "3.1.13"
15+
var osl = "0.17.2"
16+
var legacyLwjgl3 = "1.2.11"
17+
version = "1.1.0"
18+
group = "io.github.axolotlclient.oldanimations"
19+
base.archivesName = "AxolotlClient-OldAnimations"
20+
21+
repositories {
22+
maven("https://moehreag.duckdns.org/maven/snapshots")
23+
maven("https://moehreag.duckdns.org/maven/releases")
24+
maven("https://repo.hypixel.net/repository/Hypixel/") {
25+
content {
26+
includeGroup("net.hypixel")
27+
}
28+
}
29+
mavenLocal()
30+
mavenCentral()
31+
}
32+
33+
ploceus {
34+
setIntermediaryGeneration(2)
35+
}
36+
37+
loom {
38+
accessWidenerPath.set(file("src/main/resources/oldanimations.accesswidener"))
39+
40+
mods {
41+
create("axolotlclient-oldanimations") {
42+
sourceSet("main")
43+
}
44+
}
45+
runs {
46+
getByName("client") {
47+
vmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+IgnoreUnrecognizedVMOptions")
48+
}
49+
remove(getByName("server"))
50+
}
51+
}
52+
53+
dependencies {
54+
minecraft("com.mojang:minecraft:1.8.9")
55+
mappings(ploceus.featherMappings(featherBuild))
56+
57+
modImplementation("net.fabricmc:fabric-loader:$fabricLoader")
58+
59+
modImplementation("io.github.axolotlclient:AxolotlClient:$client+1.8.9")
60+
modImplementation(include("io.github.axolotlclient:AxolotlClient-config:$config+1.8.9")!!)
61+
ploceus.dependOsl(osl)
62+
63+
modImplementation("io.github.moehreag:legacy-lwjgl3:$legacyLwjgl3+1.8.9")
64+
modImplementation("com.terraformersmc:modmenu:0.4.0+mc1.8.9")
65+
}
66+
67+
configurations.configureEach {
68+
exclude("org.lwjgl.lwjgl")
69+
resolutionStrategy {
70+
dependencySubstitution {
71+
substitute(module("io.netty:netty-all:4.0.23.Final")).using(module("io.netty:netty-all:4.0.56.Final"))
72+
}
73+
force("io.netty:netty-all:4.0.56.Final")
74+
}
75+
}
76+
77+
tasks.processResources {
78+
inputs.property("version", version)
79+
80+
filesMatching("fabric.mod.json") {
81+
expand("version" to version)
82+
}
83+
}
84+
85+
tasks.withType(JavaCompile::class).configureEach {
86+
options.encoding = "UTF-8"
87+
88+
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_18)) {
89+
options.release = 17
90+
}
91+
}
92+
93+
java {
94+
withSourcesJar()
95+
sourceCompatibility = JavaVersion.VERSION_17
96+
targetCompatibility = JavaVersion.VERSION_17
97+
}
98+
99+
license {
100+
rule(file("HEADER"))
101+
include("**/*.java")
102+
}
103+
104+
// Configure the maven publication
105+
publishing {
106+
publications {
107+
create<MavenPublication>("mavenJava") {
108+
artifactId = base.archivesName.get()
109+
from(components["java"])
110+
}
111+
}
112+
113+
repositories {
114+
maven {
115+
name = "owlMaven"
116+
val repository = if (project.version.toString().contains("beta") || project.version.toString()
117+
.contains("alpha")
118+
) "snapshots" else "releases"
119+
url = uri("https://maven.axolotlclient.com/$repository")
120+
credentials(PasswordCredentials::class)
121+
authentication {
122+
create<BasicAuthentication>("basic")
123+
}
124+
}
125+
}
126+
}
127+
128+
modrinth {
129+
token = System.getenv("MODRINTH_TOKEN")
130+
projectId = "UD5CuiYt"
131+
versionNumber = "${project.version}"
132+
versionType = "release"
133+
uploadFile = tasks.remapJar.get()
134+
gameVersions.set(
135+
listOf("1.8.9")
136+
)
137+
loaders.set(
138+
listOf("fabric", "quilt")
139+
)
140+
additionalFiles.set(listOf(tasks.remapSourcesJar))
141+
dependencies {
142+
required.project("osl")
143+
optional.project("axolotlclient")
144+
}
145+
146+
// Changelog fetching: Credit LambdAurora.
147+
// https://github.com/LambdAurora/LambDynamicLights/blob/1ef85f486084873b5d97b8a08df72f57859a3295/build.gradle#L145
148+
// License: MIT
149+
val changelogText = file("CHANGELOG.md").readText()
150+
val regexVersion =
151+
((project.version) as String).split("+")[0].replace("\\.".toRegex(), "\\.").replace("\\+".toRegex(), "+")
152+
val changelogRegex = "###? ${regexVersion}\\n\\n(( *- .+\\n)+)".toRegex()
153+
val matcher = changelogRegex.find(changelogText)
154+
155+
if (matcher != null) {
156+
var changelogContent = matcher.groups[1]?.value
157+
158+
val changelogLines = changelogText.split("\n")
159+
val linkRefRegex = "^\\[([A-z0-9 _\\-/+.]+)]: ".toRegex()
160+
for (line in changelogLines.reversed()) {
161+
if ((linkRefRegex.matches(line)))
162+
changelogContent += "\n" + line
163+
else break
164+
}
165+
changelog = changelogContent
166+
} else {
167+
afterEvaluate {
168+
tasks.modrinth.configure { isEnabled = false }
169+
}
170+
}
171+
}

gradle.properties

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
11
# Done to increase the memory available to gradle.
22
org.gradle.jvmargs=-Xmx1G
33
org.gradle.parallel=true
4-
5-
# Mod Properties
6-
version=1.0.0
7-
8-
maven_group=io.github.axolotlclient.oldanimations
9-
archives_base_name=AxolotlClient-OldAnimations
10-
11-
minecraft_18=1.8.9
12-
13-
mappings_18=1.8.9+build.28
14-
15-
fabric_loader=0.17.2
16-
17-
osl=0.16.3
18-
config=3.0.22
19-
client=3.1.6
20-
21-
legacy_lwjgl3=1.2.10
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

settings.gradle

Lines changed: 0 additions & 21 deletions
This file was deleted.

settings.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pluginManagement {
2+
repositories {
3+
maven("https://maven.fabricmc.net/")
4+
maven("https://maven.ornithemc.net/releases")
5+
maven("https://maven.ornithemc.net/snapshots")
6+
gradlePluginPortal()
7+
}
8+
}

0 commit comments

Comments
 (0)