-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split dependencies into their own jar
- Loading branch information
Showing
11 changed files
with
137 additions
and
102 deletions.
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
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,32 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
|
||
val shade by configurations.creating { | ||
configurations.api.get().extendsFrom(this) | ||
} | ||
|
||
allprojects { | ||
base.archivesName = "deps" | ||
tasks.jar.get().enabled = false | ||
tasks.javadocJar.get().enabled = false | ||
tasks.sourcesJar.get().enabled = false | ||
} | ||
|
||
dependencies { | ||
shade(libs.polyui) | ||
|
||
shade(libs.bundles.kotlin) | ||
shade(libs.bundles.kotlinx) | ||
|
||
shade(libs.hypixel.modapi) | ||
|
||
shade(libs.bundles.nightconfig) | ||
} | ||
|
||
tasks { | ||
create("deps", ShadowJar::class.java) { | ||
configurations = listOf(shade) | ||
} | ||
build { | ||
dependsOn("deps") | ||
} | ||
} |
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,27 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
|
||
val shade by configurations.creating { | ||
configurations.api.get().extendsFrom(this) | ||
} | ||
|
||
base.archivesName = "oneconfig-api" | ||
|
||
dependencies { | ||
for (project in rootProject.project(":modules").subprojects) { | ||
if("dependencies" !in project.path) { | ||
shade(project(project.path)) { | ||
isTransitive = false | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks { | ||
create("bundle", ShadowJar::class.java) { | ||
configurations = listOf(shade) | ||
} | ||
|
||
build { | ||
dependsOn("bundle") | ||
} | ||
} |
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,32 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
|
||
val shade by configurations.creating { | ||
configurations.api.get().extendsFrom(this) | ||
} | ||
|
||
val natives = listOf("windows", "windows-arm64", "linux", "macos", "macos-arm64") | ||
|
||
dependencies { | ||
val lwjglVersion = libs.versions.lwjgl.get() | ||
for (dep in listOf("-nanovg", "-tinyfd", "-stb", "")) { | ||
val lwjglDep = "org.lwjgl:lwjgl$dep:$lwjglVersion" | ||
shade(lwjglDep) { | ||
isTransitive = false | ||
} | ||
for (native in natives) { | ||
shade("$lwjglDep:natives-$native") { | ||
isTransitive = false | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks { | ||
create("deps", ShadowJar::class.java) { | ||
archiveClassifier = "legacy" | ||
configurations = listOf(shade) | ||
} | ||
build { | ||
dependsOn("deps") | ||
} | ||
} |
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,30 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
|
||
val shade by configurations.creating { | ||
configurations.api.get().extendsFrom(this) | ||
} | ||
|
||
val natives = listOf("windows", "windows-arm64", "linux", "macos", "macos-arm64") | ||
|
||
dependencies { | ||
shade(libs.lwjgl.nvg) { | ||
isTransitive = false | ||
} | ||
val nvg = libs.lwjgl.nvg.get() | ||
val nvgDep = "${nvg.module}:${nvg.version}:natives-" | ||
for (native in natives) { | ||
shade("$nvgDep$native") { | ||
isTransitive = false | ||
} | ||
} | ||
} | ||
|
||
tasks { | ||
create("deps", ShadowJar::class.java) { | ||
archiveClassifier = "modern" | ||
configurations = listOf(shade) | ||
} | ||
build { | ||
dependsOn("deps") | ||
} | ||
} |
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
File renamed without changes.
File renamed without changes.
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 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