Skip to content

Commit 7fdfb52

Browse files
committed
update buildscript
1 parent df9f52d commit 7fdfb52

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

build.gradle

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//version: 1656003793falsepattern59
1+
//version: 1656003793falsepattern62
22
/*
33
DO NOT CHANGE THIS FILE!
44
@@ -282,9 +282,13 @@ if(file("addon.gradle").exists()) {
282282
apply from: 'repositories.gradle'
283283

284284
configurations {
285-
implementation.extendsFrom(shadowImplementation) // TODO: remove after all uses are refactored
286-
implementation.extendsFrom(shadowCompile)
287-
implementation.extendsFrom(shadeCompile)
285+
for (config in [shadowImplementation, shadowCompile, shadeCompile]) {
286+
implementation.extendsFrom(shadeCompile)
287+
compileClasspath.extendsFrom(config)
288+
runtimeClasspath.extendsFrom(config)
289+
testCompileClasspath.extendsFrom(config)
290+
testRuntimeClasspath.extendsFrom(config)
291+
}
288292
}
289293

290294
repositories {
@@ -314,6 +318,8 @@ dependencies {
314318
compile("org.spongepowered:mixin:0.8.5-gasstation_7")
315319
compile("com.llamalad7:MixinExtras:0.1.1-gasstation")
316320
compile("com.falsepattern:00gasstation-mc1.7.10:0.5.1:dev")
321+
runtimeClasspath('org.jetbrains:intellij-fernflower:1.2.1.16')
322+
testRuntimeClasspath('org.jetbrains:intellij-fernflower:1.2.1.16')
317323
} else if(hasMixinDeps.toBoolean()) {
318324
runtime("com.llamalad7:MixinExtras:0.1.1-gasstation")
319325
runtime("org.spongepowered:mixin:0.8.5-gasstation_7")
@@ -664,12 +670,16 @@ def getCredentials = {
664670
}
665671

666672
//Publishing
667-
publish.dependsOn(build)
668673
publishing {
669674
publications {
670675
maven(MavenPublication) {
671-
artifact source: usesShadowedDependencies.toBoolean() ? shadowJar : jar, classifier: ""
672-
artifact source: sourcesJar, classifier: "sources"
676+
from components.java
677+
if (usesShadowedDependencies.toBoolean()) {
678+
artifact source: shadowJar, classifier: ""
679+
}
680+
if (!project.hasProperty("noPublishedSources") || !noPublishedSources) {
681+
artifact source: sourcesJar, classifier: "sources"
682+
}
673683
artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev"
674684
if (apiPackage) {
675685
artifact source: apiJar, classifier: "api"
@@ -715,6 +725,12 @@ publishing {
715725
}
716726
}
717727

728+
tasks.withType(PublishToMavenRepository) { task ->
729+
dependsOn("build")
730+
}
731+
732+
publishToMavenLocal.dependsOn("build")
733+
718734
if (project.changelog == "") {
719735
File changelogFile = new File(System.getenv("CHANGELOG_FILE") ?: "CHANGELOG.md")
720736
if (changelogFile.exists()) {

0 commit comments

Comments
 (0)