-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish dependencies as seperate module (#418)
* Dependency publishing and use toolchains * Fix up tests and exclude specific included dependencies * Add foojay for toolchains to work
- Loading branch information
1 parent
b4777f2
commit 2f6b816
Showing
7 changed files
with
181 additions
and
155 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
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,113 @@ | ||
plugins { | ||
id 'maven-publish' | ||
id 'java' | ||
} | ||
|
||
base.archivesName.set 'quilt-loader-dependencies' | ||
version = rootProject.version | ||
group = rootProject.group | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(8)) | ||
} | ||
} | ||
|
||
def ENV = System.getenv() | ||
|
||
configurations { | ||
development { | ||
transitive = false | ||
canBeConsumed = true | ||
} | ||
|
||
published { | ||
extendsFrom development | ||
} | ||
|
||
runtimeElements { | ||
extendsFrom published | ||
outgoing.artifacts.clear() | ||
outgoing.variants.clear() | ||
} | ||
apiElements { | ||
extendsFrom published | ||
outgoing.artifacts.clear() | ||
outgoing.variants.clear() | ||
} | ||
|
||
include { | ||
transitive = false | ||
} | ||
} | ||
|
||
[configurations.runtimeElements, configurations.apiElements].each { | ||
// included in quilt loader and not relocated | ||
it.exclude(group: 'org.quiltmc.quilt-config.serializers', module: 'toml') | ||
it.exclude(group: 'org.quiltmc.quilt-config.serializers', module: 'json5') | ||
} | ||
|
||
dependencies { | ||
// Non-"include"d dependencies must be added to the LoaderLibrary class as well. | ||
published "org.ow2.asm:asm:${project.asm}" | ||
published "org.ow2.asm:asm-analysis:${project.asm}" | ||
published "org.ow2.asm:asm-commons:${project.asm}" | ||
published "org.ow2.asm:asm-tree:${project.asm}" | ||
published "org.ow2.asm:asm-util:${project.asm}" | ||
|
||
published("net.fabricmc:sponge-mixin:${project.sponge_mixin}") { | ||
exclude module: 'launchwrapper' | ||
exclude module: 'guava' | ||
} | ||
published "net.fabricmc:tiny-mappings-parser:${project.tiny_mappings_parser}" | ||
published "net.fabricmc:tiny-remapper:${project.tiny_remapper}" | ||
published "net.fabricmc:access-widener:${project.access_widener}" | ||
|
||
/*include*/ published "org.quiltmc:quilt-json5:${project.quilt_json5}" | ||
published "org.quiltmc:quilt-config:${project.quilt_config}" | ||
|
||
development "io.github.llamalad7:mixinextras-fabric:$mixin_extras" | ||
|
||
include "org.quiltmc:quilt-loader-sat4j:${project.quilt_loader_sat4j}" | ||
|
||
include "org.quiltmc.quilt-config.serializers:toml:${project.quilt_config}" | ||
include "org.quiltmc.quilt-config.serializers:json5:${project.quilt_config}" | ||
|
||
include "com.electronwill.night-config:core:${project.night_config}" | ||
include "com.electronwill.night-config:toml:${project.night_config}" | ||
|
||
include "org.quiltmc.parsers:json:${project.quilt_parsers}" | ||
include "com.unascribed:flexver-java:${project.flexver}" | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
artifactId project.archivesBaseName | ||
from components.java | ||
} | ||
} | ||
|
||
repositories { | ||
if (ENV.MAVEN_URL) { | ||
maven { | ||
url ENV.MAVEN_URL | ||
credentials { | ||
username ENV.MAVEN_USERNAME | ||
password ENV.MAVEN_PASSWORD | ||
} | ||
} | ||
} else if (ENV.SNAPSHOTS_URL) { | ||
maven { | ||
url ENV.SNAPSHOTS_URL | ||
|
||
credentials { | ||
username ENV.SNAPSHOTS_USERNAME | ||
password ENV.SNAPSHOTS_PASSWORD | ||
} | ||
} | ||
} else { | ||
mavenLocal() | ||
} | ||
} | ||
} |
Oops, something went wrong.