-
-
Notifications
You must be signed in to change notification settings - Fork 797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotlin Gradle #4831
Open
RickyTheRacc
wants to merge
13
commits into
MeteorDevelopment:master
Choose a base branch
from
RickyTheRacc:kotlin-gradle
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Kotlin Gradle #4831
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
60e8be9
Update settings.gradle
RickyTheRacc dadde32
All I got in me tonight
RickyTheRacc bc9832b
I Forgor
RickyTheRacc 027b6cf
So Close
RickyTheRacc d5c1675
No Errors but Broken
RickyTheRacc c913b9e
Bruh Moment
RickyTheRacc 35c2593
Properly suppress lint
RickyTheRacc 5ceab9d
Fix this also
RickyTheRacc 27aae42
Guh
RickyTheRacc ae12d4e
Appease Crosby
RickyTheRacc 29f534c
Subproject Kotlin Gradle
RickyTheRacc ba6c742
Both of them..
RickyTheRacc 0c900a1
Val
RickyTheRacc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,188 @@ | ||
plugins { | ||
id("fabric-loom") version "1.7-SNAPSHOT" | ||
id("maven-publish") | ||
id("com.github.johnrengelman.shadow") version "8.1.1" | ||
} | ||
|
||
val devBuild: String = (project.findProperty("devbuild") ?: "").toString() | ||
val commit: String = (project.findProperty("commit") ?: "").toString() | ||
|
||
base { | ||
archivesName = project.property("archives_base_name").toString() | ||
version = project.property("mod_version").toString() | ||
if (devBuild.isNotEmpty()) version = "$version-$devBuild" | ||
group = project.property("maven_group").toString() | ||
} | ||
|
||
repositories { | ||
maven("https://maven.meteordev.org/releases") { | ||
name = "meteor-maven" | ||
} | ||
maven("https://maven.meteordev.org/snapshots") { | ||
name = "meteor-maven-snapshots" | ||
} | ||
maven("https://api.modrinth.com/maven") { | ||
name = "modrinth" | ||
content { | ||
includeGroup("maven.modrinth") | ||
} | ||
} | ||
maven("https://maven.vram.io//") { | ||
name = "vram" | ||
} | ||
maven("https://repo.viaversion.com") { | ||
name = "viaversion" | ||
} | ||
} | ||
|
||
dependencies { | ||
// Fabric | ||
minecraft("com.mojang:minecraft:${project.property("minecraft_version")}") | ||
mappings("net.fabricmc:yarn:${project.property("yarn_mappings")}:v2") | ||
modImplementation("net.fabricmc:fabric-loader:${project.property("loader_version")}") | ||
|
||
include(fabricApi.module("fabric-resource-loader-v0", project.property("fapi_version").toString())) | ||
modRuntimeOnly(fabricApi.module("fabric-resource-loader-v0", project.property("fapi_version").toString())) | ||
|
||
// Compat fixes | ||
modCompileOnly(fabricApi.module("fabric-renderer-indigo", project.property("fapi_version").toString())) | ||
modCompileOnly("maven.modrinth:sodium:${project.property("sodium_version")}") { isTransitive = false } | ||
modCompileOnly("maven.modrinth:lithium:${project.property("lithium_version")}") { isTransitive = false } | ||
modCompileOnly("maven.modrinth:iris:${project.property("iris_version")}") { isTransitive = false } | ||
modCompileOnly("maven.modrinth:indium:${project.property("indium_version")}") { isTransitive = false } | ||
modCompileOnly("de.florianmichael:ViaFabricPlus:${project.property("viafabricplus_version")}") { isTransitive = false } | ||
|
||
// Baritone | ||
modCompileOnly("meteordevelopment:baritone:${project.property("baritone_version")}") | ||
|
||
// Libraries | ||
|
||
implementation("meteordevelopment:orbit:${project.property("orbit_version")}") | ||
shadow("meteordevelopment:orbit:${project.property("orbit_version")}") | ||
|
||
implementation("meteordevelopment:starscript:${project.property("starscript_version")}") | ||
shadow("meteordevelopment:starscript:${project.property("starscript_version")}") | ||
|
||
implementation("meteordevelopment:discord-ipc:${project.property("discordipc_version")}") | ||
shadow("meteordevelopment:discord-ipc:${project.property("discordipc_version")}") | ||
|
||
implementation("org.reflections:reflections:${project.property("reflections_version")}") | ||
shadow("org.reflections:reflections:${project.property("reflections_version")}") | ||
|
||
implementation("io.netty:netty-handler-proxy:${project.property("netty_version")}") { isTransitive = false } | ||
shadow("io.netty:netty-handler-proxy:${project.property("netty_version")}") { isTransitive = false } | ||
|
||
implementation("io.netty:netty-codec-socks:${project.property("netty_version")}") { isTransitive = false } | ||
shadow("io.netty:netty-codec-socks:${project.property("netty_version")}") { isTransitive = false } | ||
|
||
implementation("de.florianmichael:WaybackAuthLib:${project.property("waybackauthlib_version")}") | ||
shadow("de.florianmichael:WaybackAuthLib:${project.property("waybackauthlib_version")}") | ||
|
||
// Launch sub project | ||
shadow(project(":launch")) | ||
} | ||
|
||
loom { | ||
accessWidenerPath = file("src/main/resources/meteor-client.accesswidener") | ||
} | ||
|
||
afterEvaluate { | ||
tasks.migrateMappings.configure { | ||
setOutputDir("src/main/java") | ||
} | ||
} | ||
|
||
tasks { | ||
processResources { | ||
val propertiesMap = mapOf( | ||
"version" to project.version, | ||
"devbuild" to devBuild, | ||
"commit" to commit, | ||
"minecraft_version" to project.property("minecraft_version"), | ||
"loader_version" to project.property("loader_version") | ||
) | ||
|
||
inputs.properties(propertiesMap) | ||
filesMatching("fabric.mod.json") { | ||
expand(propertiesMap) | ||
} | ||
} | ||
|
||
jar { | ||
from("LICENSE") { | ||
rename{ | ||
"${it}_${project.base.archivesName}" | ||
} | ||
} | ||
|
||
manifest { | ||
attributes["Main-Class"] = "meteordevelopment.meteorclient.main" | ||
} | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_21 | ||
targetCompatibility = JavaVersion.VERSION_21 | ||
|
||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
shadowJar { | ||
configurations = listOf(project.configurations.shadow.get()) | ||
|
||
from("LICENSE") { | ||
rename { "${it}_${project.base.archivesName}" } | ||
} | ||
|
||
dependencies { | ||
exclude { | ||
it.moduleGroup == "org.slf4j" | ||
} | ||
} | ||
} | ||
|
||
remapJar { | ||
dependsOn(shadowJar) | ||
inputFile.set(shadowJar.get().archiveFile) | ||
} | ||
|
||
javadoc { | ||
with (options as StandardJavadocDocletOptions) { | ||
addStringOption("Xdoclint:none", "-quiet") | ||
addStringOption("encoding", "UTF-8") | ||
addStringOption("charSet", "UTF-8") | ||
} | ||
} | ||
|
||
build { | ||
dependsOn("javadocJar") | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("mavenJava") { | ||
from(components["java"]) | ||
artifactId = "meteor-client" | ||
|
||
version = project.property("mod_version").toString() | ||
if (project.hasProperty("devbuild")) version += "-SNAPSHOT" | ||
} | ||
} | ||
|
||
repositories { | ||
maven(if (project.hasProperty("devbuild")) "https://maven.meteordev.org/snapshots" else "https://maven.meteordev.org/releases") { | ||
name = "meteor-maven" | ||
|
||
credentials { | ||
username = System.getenv("MAVEN_METEOR_ALIAS") | ||
password = System.getenv("MAVEN_METEOR_TOKEN") | ||
} | ||
|
||
authentication { | ||
create<BasicAuthentication>("basic") | ||
} | ||
} | ||
} | ||
} |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a space (
rename {
) and make into single line, like in theshadowJar
task