Awoocord/canary/ComponentsV2/build.gradle.kts

70 lines
1.8 KiB
Text
Raw Normal View History

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
version = "8.8.0"
description = "Beta backport of ComponentsV2"
2025-12-06 17:55:32 +11:00
android {
namespace = "moe.lava.corenary.componentsv2"
}
aliucord {
// Changelog of your plugin
changelog.set("""
TODO {fixed}
======================
* File component
* SelectV2: searching
* SelectV2: showing selected items in chat list
Changelog {added marginTop}
======================
# 8.8.0
* Fix a possible weird crash
2025-08-07 02:44:01 +10:00
# 8.7.0
* Prevent ViewRaw crash
* Add a CV2 tag to distinguish new embeds (will not be in core)
# 7.15.1
* Fix broken reply preview >w<
# 7.15.0
* Initial release >w<
""".trimIndent())
2025-12-06 17:55:32 +11:00
deploy.set(true)
}
2025-12-06 17:55:32 +11:00
apply {
plugin(libs.plugins.shadow.get().pluginId)
}
val shadowDir = File(buildDir, "intermediates/shadowed")
tasks.register<ShadowJar>("relocateJar") {
val task = tasks.findByName("compileDebugKotlin")!!
from(task.outputs)
// relocate("com.discord.api.botuikit", "moe.lava.awoocanary.componentsv2.botuikit") {
// exclude("com.discord.api.botuikit.ComponentType")
// }
relocate("com.aliucord.coreplugins.componentsv2", "moe.lava.corenary.componentsv2")
relocate("com.aliucord.coreplugins.ComponentsV2", "moe.lava.corenary.ComponentsV2")
archiveClassifier.set("shadowed")
destinationDirectory.set(File(buildDir, "intermediates"))
}
tasks.register<Sync>("copyShadowed") {
val reloc = tasks.findByName("relocateJar")!! as ShadowJar
dependsOn(reloc)
from(zipTree(reloc.archiveFile))
into(shadowDir)
}
project.afterEvaluate {
tasks.compileDex {
val copyShadowed = tasks.findByName("copyShadowed")!! as Sync
dependsOn(copyShadowed)
input.setFrom(shadowDir)
}
}