fix: 修复无法构建fabric环境问题
This commit is contained in:
parent
d6617bf3ce
commit
db7fe0b8f0
|
|
@ -42,6 +42,7 @@ repositories {
|
||||||
name = 'BlameJared'
|
name = 'BlameJared'
|
||||||
url = 'https://maven.blamejared.com'
|
url = 'https://maven.blamejared.com'
|
||||||
}
|
}
|
||||||
|
maven { url 'https://maven.covers1624.net/' }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Declare capabilities on the outgoing configurations.
|
// Declare capabilities on the outgoing configurations.
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,8 @@ clean {
|
||||||
delete 'generated'
|
delete 'generated'
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
|
||||||
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
|
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant ->
|
||||||
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant ->
|
|
||||||
try {
|
try {
|
||||||
configurations.named(variant) {
|
configurations.named(variant) {
|
||||||
if (!it.isLocked()) {
|
if (!it.isLocked()) {
|
||||||
|
|
@ -51,8 +50,8 @@ afterEvaluate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
sourceSets.configureEach {
|
sourceSets.configureEach {
|
||||||
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName].each { variant ->
|
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName].each { variant ->
|
||||||
try {
|
try {
|
||||||
configurations.named(variant) {
|
configurations.named(variant) {
|
||||||
|
|
@ -64,5 +63,4 @@ afterEvaluate {
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'multiloader-loader'
|
id 'multiloader-loader'
|
||||||
id 'fabric-loom'
|
id 'net.fabricmc.fabric-loom'
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft "com.mojang:minecraft:${minecraft_version}"
|
minecraft "com.mojang:minecraft:${minecraft_version}"
|
||||||
|
|
@ -134,9 +134,8 @@ loom {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
|
||||||
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
|
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements', 'includeInternal', 'modCompileClasspath'].each { variant ->
|
||||||
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements', 'includeInternal', 'modCompileClasspath'].each { variant ->
|
|
||||||
try {
|
try {
|
||||||
configurations.named(variant) {
|
configurations.named(variant) {
|
||||||
if (!it.isLocked()) {
|
if (!it.isLocked()) {
|
||||||
|
|
@ -146,8 +145,8 @@ afterEvaluate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
sourceSets.configureEach {
|
sourceSets.configureEach {
|
||||||
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName].each { variant ->
|
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName].each { variant ->
|
||||||
try {
|
try {
|
||||||
configurations.named(variant) {
|
configurations.named(variant) {
|
||||||
|
|
@ -159,5 +158,4 @@ afterEvaluate {
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -108,9 +108,8 @@ tasks.named('build') {
|
||||||
sourceSets.main.resources.srcDir project(':common').file('src/generated/resources')
|
sourceSets.main.resources.srcDir project(':common').file('src/generated/resources')
|
||||||
|
|
||||||
|
|
||||||
afterEvaluate {
|
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
|
||||||
def loaderAttribute = Attribute.of('io.github.mcgradleconventions.loader', String)
|
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant ->
|
||||||
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant ->
|
|
||||||
try {
|
try {
|
||||||
configurations.named(variant) {
|
configurations.named(variant) {
|
||||||
if (!it.isLocked()) {
|
if (!it.isLocked()) {
|
||||||
|
|
@ -120,8 +119,8 @@ afterEvaluate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
sourceSets.configureEach {
|
sourceSets.configureEach {
|
||||||
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName, it.getTaskName(null, 'jarJar')].each { variant ->
|
[it.compileClasspathConfigurationName, it.runtimeClasspathConfigurationName, it.getTaskName(null, 'jarJar')].each { variant ->
|
||||||
try {
|
try {
|
||||||
configurations.named(variant) {
|
configurations.named(variant) {
|
||||||
|
|
@ -133,5 +132,4 @@ afterEvaluate {
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user