Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-19 09:20:08 +01:00
Account for IntelliJ bug
Dieser Commit ist enthalten in:
Ursprung
ad5dcbea58
Commit
5fa311be48
@ -1,5 +1,6 @@
|
|||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
import net.fabricmc.loom.task.RemapJarTask
|
import net.fabricmc.loom.task.RemapJarTask
|
||||||
|
import kotlin.reflect.KClass
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
@ -95,11 +96,16 @@ artifacts {
|
|||||||
add("archives", tasks.named("deobfJar"))
|
add("archives", tasks.named("deobfJar"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<RemapJarTask>("remapShadowJar") {
|
// intellij has trouble detecting RemapJarTask as a subclass of Task
|
||||||
val shadowJar = tasks.getByName<ShadowJar>("shadowJar")
|
@Suppress("UNCHECKED_CAST")
|
||||||
dependsOn(shadowJar)
|
val remapJarIntellijHack = RemapJarTask::class as KClass<Task>
|
||||||
setInput(shadowJar.archiveFile)
|
tasks.register("remapShadowJar", remapJarIntellijHack) {
|
||||||
setOutput(shadowJar.archiveFile.get().asFile.absolutePath.replace(Regex("-dev\\.jar$"), ".jar"))
|
(this as RemapJarTask).run {
|
||||||
|
val shadowJar = tasks.getByName<ShadowJar>("shadowJar")
|
||||||
|
dependsOn(shadowJar)
|
||||||
|
setInput(shadowJar.archiveFile)
|
||||||
|
setOutput(shadowJar.archiveFile.get().asFile.absolutePath.replace(Regex("-dev\\.jar$"), ".jar"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("assemble").configure {
|
tasks.named("assemble").configure {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren