- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스) - Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포 - 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 lines
1.5 KiB
Groovy
45 lines
1.5 KiB
Groovy
// Gradle script for generating serialized public app config (from app.config.js/ts or app.json) and bundling it into the APK
|
|
|
|
import org.apache.tools.ant.taskdefs.condition.Os
|
|
|
|
|
|
def expoConstantsDir = project.providers.exec {
|
|
workingDir(projectDir)
|
|
commandLine("node", "-e", "console.log(require('path').dirname(require.resolve('expo-constants/package.json')));")
|
|
}.standardOutput.asText.get().trim()
|
|
|
|
def config = project.hasProperty("react") ? project.react : [];
|
|
def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"]
|
|
|
|
afterEvaluate {
|
|
def projectRoot = file("${rootProject.projectDir}")
|
|
def assetsDir = file("$buildDir/generated/assets/expo-constants")
|
|
|
|
def currentCreateConfigTask = tasks.register('createExpoConfig', Exec) {
|
|
description = 'expo-constants: Create app.config.'
|
|
|
|
doFirst {
|
|
assetsDir.deleteDir()
|
|
assetsDir.mkdirs()
|
|
}
|
|
|
|
// Add generated assetsDir into assets.srcDirs
|
|
project.android.sourceSets.main.assets.srcDirs += assetsDir
|
|
|
|
// Set up outputs so gradle can cache the result
|
|
outputs.dir assetsDir
|
|
|
|
// Switch to project root and generate the app config
|
|
workingDir projectRoot
|
|
|
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
commandLine("cmd", "/c", *nodeExecutableAndArgs, "$expoConstantsDir/scripts/getAppConfig.js", projectRoot, assetsDir)
|
|
} else {
|
|
commandLine(*nodeExecutableAndArgs, "$expoConstantsDir/scripts/getAppConfig.js", projectRoot, assetsDir)
|
|
}
|
|
}
|
|
|
|
// Generate app.config at preBuild
|
|
tasks.getByName('preBuild').dependsOn(currentCreateConfigTask)
|
|
}
|