-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ac1412
commit a030eb9
Showing
284 changed files
with
11,819 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,43 @@ | ||
# gradle | ||
|
||
.gradle/ | ||
build/ | ||
out/ | ||
classes/ | ||
|
||
# eclipse | ||
bin | ||
|
||
*.launch | ||
.settings | ||
.metadata | ||
.classpath | ||
.project | ||
|
||
# idea | ||
out | ||
|
||
.idea/ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
*.iml | ||
.idea | ||
|
||
# gradle | ||
build | ||
.gradle | ||
# vscode | ||
|
||
.settings/ | ||
.vscode/ | ||
bin/ | ||
.classpath | ||
.project | ||
|
||
# macos | ||
|
||
*.DS_Store | ||
|
||
# fabric | ||
|
||
run/ | ||
|
||
# other | ||
eclipse | ||
run | ||
# java | ||
|
||
# HeadlessMC | ||
/HeadlessMC/ | ||
/.vscode/ | ||
/logs/ | ||
hs_err_*.log | ||
replay_*.log | ||
*.hprof | ||
*.jfr | ||
/libs/ | ||
/logs/ | ||
/.architectury-transformer/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,215 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
import org.gradle.api.publish.maven.MavenPublication | ||
|
||
plugins { | ||
id 'com.github.johnrengelman.shadow' version '7.1.2' | ||
id 'java' | ||
id 'maven-publish' | ||
id 'xyz.wagyourtail.unimined' version '1.1.0' | ||
} | ||
|
||
group='me.earth.headlessmc' | ||
version "$minecraft_version-${project(':api').project_version}" | ||
|
||
base { | ||
archivesName = 'hmc-specifics' | ||
} | ||
|
||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
sourceSets { | ||
fabric { | ||
compileClasspath += sourceSets.main.output | ||
runtimeClasspath += sourceSets.main.output | ||
} | ||
lexforge { | ||
compileClasspath += sourceSets.main.output | ||
runtimeClasspath += sourceSets.main.output | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "wagyourtail releases" | ||
url = "https://maven.wagyourtail.xyz/releases" | ||
} | ||
maven { | ||
name = "sponge" | ||
url = "https://repo.spongepowered.org/maven" | ||
} | ||
maven { | ||
name = 'impactdevelopment-repo' | ||
url = 'https://impactdevelopment.github.io/maven/' | ||
} | ||
maven { | ||
name '3arthMaven' | ||
url 'https://3arthqu4ke.github.io/maven' | ||
} | ||
|
||
mavenCentral() | ||
} | ||
|
||
unimined.minecraft { | ||
version project.minecraft_version | ||
|
||
mappings { | ||
searge() | ||
mcp("stable", "39-1.12") | ||
} | ||
|
||
defaultRemapJar = false | ||
} | ||
|
||
unimined.minecraft(sourceSets.fabric) { | ||
combineWith(sourceSets.main) | ||
|
||
legacyFabric { | ||
loader project.fabric_version | ||
} | ||
|
||
defaultRemapJar = true | ||
} | ||
|
||
unimined.minecraft(sourceSets.lexforge) { | ||
combineWith(sourceSets.main) | ||
|
||
minecraftForge { | ||
loader project.lexforge_version | ||
mixinConfig "mixins.headlessmc.json" | ||
} | ||
|
||
defaultRemapJar = true | ||
} | ||
|
||
configurations { | ||
mainImplementation | ||
implementation { | ||
extendsFrom lexforgeImplementation | ||
extendsFrom fabricImplementation | ||
} | ||
|
||
jarLibs | ||
implementation.extendsFrom jarLibs | ||
} | ||
|
||
sourceSets { | ||
main { | ||
compileClasspath += configurations.mainImplementation | ||
runtimeClasspath += configurations.mainImplementation | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation ('net.minecraft:launchwrapper:1.12') { | ||
exclude module: 'log4j-api' | ||
exclude module: 'log4j-core' | ||
} | ||
jarLibs 'com.github.ImpactDevelopment:SimpleTweaker:1.2' | ||
jarLibs('org.spongepowered:mixin:0.7.11-SNAPSHOT') { | ||
exclude module: 'launchwrapper' | ||
exclude module: 'guava' | ||
exclude module: 'gson' | ||
exclude module: 'commons-io' | ||
} | ||
|
||
jarLibs project(':api') | ||
jarLibs 'me.earth.headlessmc:headlessmc-api:1.8.0' | ||
jarLibs 'me.earth.headlessmc:headlessmc-commons:1.8.0' | ||
jarLibs 'me.earth.headlessmc:headlessmc-runtime:1.8.0' | ||
} | ||
|
||
for (String platform_capitalized : ['Fabric', 'Lexforge']) { | ||
def platform = platform_capitalized.toLowerCase() | ||
def remapJarTask = tasks.named("remap${platform_capitalized}Jar", AbstractArchiveTask).get() | ||
def shadowTask = tasks.register("${platform}ShadowJar", ShadowJar) { | ||
dependsOn(remapJarTask) | ||
it.group = 'build' | ||
it.archiveClassifier = "${platform}-release" | ||
from remapJarTask.outputs | ||
it.configurations += [ project.configurations.jarLibs ] | ||
// Mixin is signed | ||
exclude 'META-INF/*.RSA' | ||
exclude 'META-INF/*.SF' | ||
} | ||
|
||
tasks.named('build') { finalizedBy(shadowTask) } | ||
} | ||
|
||
|
||
jar { | ||
enabled = false | ||
} | ||
|
||
tasks.withType(org.gradle.jvm.tasks.Jar).configureEach { | ||
from("LICENSE") { | ||
duplicatesStrategy = DuplicatesStrategy.INCLUDE | ||
rename { "${it}_${project.archivesBaseName}" } | ||
} | ||
|
||
manifest { | ||
attributes( | ||
'Implementation-Title': 'HMC-Specifics', | ||
'TweakClass': 'me.earth.headlessmc.mc.tweaker.HeadlessMcMcTweaker', | ||
'MixinConfigs': "mixins.headlessmc.json", | ||
'Implementation-Version': project.version, | ||
) | ||
} | ||
} | ||
|
||
processFabricResources { | ||
inputs.property "version", project.version | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand "version": project.version | ||
} | ||
} | ||
|
||
processLexforgeResources { | ||
inputs.property "version", project.version | ||
|
||
filesMatching("META-INF/mods.toml") { | ||
expand "version": project.version | ||
} | ||
|
||
filesMatching("mcmod.info") { | ||
expand "version": project.version | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
"${name.toLowerCase()}"(MavenPublication) { | ||
((MavenPublication) it).groupId "${group}" | ||
((MavenPublication) it).artifactId "${archivesBaseName.toLowerCase()}" | ||
((MavenPublication) it).version "${version}" | ||
from components.java | ||
for (String platform: ['Fabric', 'Lexforge']) { | ||
String platform_lower = platform.toLowerCase() | ||
artifact tasks.named("${platform_lower}Jar").get() | ||
artifact tasks.named("remap${platform}Jar").get() | ||
artifact tasks.named("${platform_lower}ShadowJar").get() | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
if (System.getenv('DEPLOY_TO_GITHUB_PACKAGES_URL') == null) { | ||
maven { | ||
name = 'BuildDirMaven' | ||
url = rootProject.projectDir.toPath().parent.resolve('build').resolve('maven') | ||
} | ||
} else { | ||
maven { | ||
name = 'GithubPagesMaven' | ||
url = System.getenv('DEPLOY_TO_GITHUB_PACKAGES_URL') | ||
credentials { | ||
username = System.getenv('GITHUB_USER') | ||
password = System.getenv('GITHUB_TOKEN') | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
org.gradle.jvmargs = -Xmx2G | ||
|
||
minecraft_version = 1.12.2 | ||
lexforge_version = 14.23.5.2860 | ||
fabric_version = 0.14.20 |
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
gradle/wrapper/gradle-wrapper.properties → .../gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.