mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-24 10:32:15 +02:00
parent
bf49bcbe11
commit
bc4498e13c
@ -1,3 +1,4 @@
|
|||||||
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.androidLibrary)
|
alias(libs.plugins.androidLibrary)
|
||||||
alias(libs.plugins.kotlinAndroid)
|
alias(libs.plugins.kotlinAndroid)
|
||||||
@ -16,12 +17,22 @@ android {
|
|||||||
|
|
||||||
task("compileTypeScript") {
|
task("compileTypeScript") {
|
||||||
doLast {
|
doLast {
|
||||||
project.exec {
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||||
commandLine("npx", "--yes", "tsc", "--project", "tsconfig.json")
|
project.exec {
|
||||||
}
|
commandLine("npx.cmd", "--yes", "tsc", "--project", "tsconfig.json")
|
||||||
project.exec {
|
}
|
||||||
commandLine("npx", "--yes", "rollup", "--config", "rollup.config.js", "--bundleConfigAsCjs")
|
project.exec {
|
||||||
|
commandLine("npx.cmd", "--yes", "rollup", "--config", "rollup.config.js", "--bundleConfigAsCjs")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
project.exec {
|
||||||
|
commandLine("npx", "--yes", "tsc", "--project", "tsconfig.json")
|
||||||
|
}
|
||||||
|
project.exec {
|
||||||
|
commandLine("npx", "--yes", "rollup", "--config", "rollup.config.js", "--bundleConfigAsCjs")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project.copy {
|
project.copy {
|
||||||
from("build/loader.js")
|
from("build/loader.js")
|
||||||
into("build/assets/composer")
|
into("build/assets/composer")
|
||||||
@ -31,4 +42,4 @@ task("compileTypeScript") {
|
|||||||
|
|
||||||
tasks.named("preBuild").configure {
|
tasks.named("preBuild").configure {
|
||||||
dependsOn("compileTypeScript")
|
dependsOn("compileTypeScript")
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user