Я хочу выполнить команду gradle из php для сборки Android APK с другим идентификатором приложения и именем приложения
PHP
exec("cd D:\androidApp && gradlew assembleDebug -PapplicationId=" . $applicationId . " -PapplicationName=" . $applicationName, $output_array);
build.gradle
android {
def getMyApplicationId = { ->
def appId = project.hasProperty('applicationId') ? applicationId : "com.example.test"
println "ApplicationId is set to $appId"
return appId
}
def getMyApplicationName = { ->
def name = project.hasProperty('applicationName') ? applicationName: "Test"
println "ApplicationName is set to $name"
return name
}
compileSdkVersion 28
defaultConfig {
applicationId getMyApplicationId()
minSdkVersion 17
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
resValue("string", "app_name", getMyApplicationName())
}
debug {
resValue("string", "app_name", getMyApplicationName())
debuggable true
applicationIdSuffix '.debug'
versionNameSuffix '-DEBUG'
}
}}
выходной результат:
0 => 'Active code page: 65001'
1 => 'Parallel execution is an incubating feature.'
2 => 'ApplicationId is set to net.yasux.asdfsafsdf'
3 => 'ApplicationName is set to sdfsadfsf'
4 => 'ApplicationName is set to sdfsadfsf'
5 => ':app:checkDebugClasspath UP-TO-DATE'
6 => ':app:preBuild UP-TO-DATE'
7 => ':app:preDebugBuild UP-TO-DATE'
8 => ':app:compileDebugAidl NO-SOURCE'
9 => ':app:compileDebugRenderscript UP-TO-DATE'
10 => ':app:checkDebugManifest UP-TO-DATE'
11 => ':app:generateDebugBuildConfig'
12 => ':app:prepareLintJar UP-TO-DATE'
13 => ':app:mainApkListPersistenceDebug UP-TO-DATE'
14 => ':app:generateDebugResValues'
15 => ':app:generateDebugResources'
16 => ':app:mergeDebugResources FAILED'
17 => '9 actionable tasks: 3 executed, 6 up-to-date'
16 => ': app: mergeDebugResources FAILED'
Я попытался выполнить эту команду в Windows cmd, апк будет создан успешнов то время как в php не удалось
каков источник ошибки?
Заранее спасибо:)