buildconfig

applicationId manifest placeholder for multiple build flavors not working

筅森魡賤 提交于 2020-12-02 06:54:49
问题 I am modifying current android project so it can be installed on same device for multiple flavors and build configs. build.gradle: { // ... defaultConfig { applicationId "com.myapp" manifestPlaceholders = [ manifestApplicationId: "${applicationId}", onesignal_app_id: "xxxx", onesignal_google_project_number: "xxxx" ] // ... } productFlavors { production { applicationId "com.myapp" // ... } dev { applicationId "com.myapp.dev" // ... } // ... } buildTypes { release { // ... } debug {

applicationId manifest placeholder for multiple build flavors not working

 ̄綄美尐妖づ 提交于 2020-12-02 06:53:49
问题 I am modifying current android project so it can be installed on same device for multiple flavors and build configs. build.gradle: { // ... defaultConfig { applicationId "com.myapp" manifestPlaceholders = [ manifestApplicationId: "${applicationId}", onesignal_app_id: "xxxx", onesignal_google_project_number: "xxxx" ] // ... } productFlavors { production { applicationId "com.myapp" // ... } dev { applicationId "com.myapp.dev" // ... } // ... } buildTypes { release { // ... } debug {

Why does the BuildConfig class use Boolean.parseBoolean() instead of literal values?

*爱你&永不变心* 提交于 2020-01-11 08:16:07
问题 When looking at the BuildConfig class generated by Android Studio and the Gradle plugin one can see that the BuildConfig.DEBUG field is initialized using the Boolean.parseBoolean(String) call instead of using one of the boolean literals true or false . When I add custom build properties using Gradle I would simply do it like this: android { buildTypes.debug.buildConfigField 'boolean', 'SOME_SETTING', 'true' } But looking at the generated BuildConfig tells me that Google has taken a different

Grails Inline Plugins: Cannot Upgrade a plugin that is configured via BuildConfig.groovy

眉间皱痕 提交于 2019-12-22 05:21:53
问题 Our app is split into a main application and a few plugins. We're using inline plugins via the BuildConfig.groovy file. When it is time to WAR the whole thing up for production I'm getting the following message: You cannot upgrade a plugin that is configured via BuildConfig.groovy, remove the configuration to continue. And then Grails wants to uninstall the plugin because it can't find it in application.properties. But during development, having it in application.properties causes issues. So

adding url to BuildConfig file from Gradle

╄→尐↘猪︶ㄣ 提交于 2019-12-12 20:28:14
问题 My BuildConfig is generated by Gradle. One of my strings is a URL. When I try to create an apk, I get an error about the : in the url. Any ideas what I should tell gradle so this works fine? Here is what I told Gradle: buildConfigField "String","My_CLOUD_API","http://12.3.456.789:123" Here is the BuildConfig.java constant that was created public static final String My_CLOUD_API = http://12.3.456.789:123; Here is the error: error: ';' expected 回答1: try buildConfigField "String", "MY_CLOUD_API"

BuildConfig prop for each buildType / productFlavor combination

北城以北 提交于 2019-12-12 17:20:31
问题 I have free and paid versions of an app. I need to configure with gradle a prop on BuildConfig that is different for each buildType / productFlavor combination. free-debug -> prop1=value1 free-release -> prop1=value2 paid-debug -> prop1=value3 paid-release -> prop1=value4 My build types are debug / release, and my product flavors are free / paid Could you help me with this? 来源: https://stackoverflow.com/questions/27405301/buildconfig-prop-for-each-buildtype-productflavor-combination

Custom Plugin dependencies.groovy is ignored

元气小坏坏 提交于 2019-12-11 10:37:12
问题 The Problem: I've built a custom grails plugin, defined my dependencies on other plugins via BuildConfig.groovy and packaged my plugin into a zip file. I then added the zip to my local maven repository and all is well. The file dependencies.groovy within the zip has my dependent plugin entries as it should. Example: grails.project.dependency.resolution = { inherits 'global' log 'warn' repositories { grailsCentral() } dependencies { // runtime 'mysql:mysql-connector-java:5.1.5' } plugins {

Grails Inline Plugins: Cannot Upgrade a plugin that is configured via BuildConfig.groovy

≯℡__Kan透↙ 提交于 2019-12-05 06:39:42
Our app is split into a main application and a few plugins. We're using inline plugins via the BuildConfig.groovy file. When it is time to WAR the whole thing up for production I'm getting the following message: You cannot upgrade a plugin that is configured via BuildConfig.groovy, remove the configuration to continue. And then Grails wants to uninstall the plugin because it can't find it in application.properties. But during development, having it in application.properties causes issues. So when we're ready to create a production WAR, how do we work around this without commenting the plugins

#if debug --> #if myOwnConfig?

风流意气都作罢 提交于 2019-12-03 18:32:34
问题 is there a way in Visual Studio to use a custom Configuration like "#if DEBUG" I need a "#if OFFLINE" as my Build-Config's name is "Offline" (only for further debug-purposes too)... Thanks! 回答1: Build -> Configuration manager -> Active solution configuration -> New... Create a new configuration "Offline". Project -> Properties -> Build -> Configuration -> Offline Conditional compilation symbols: type OFFLINE Save project. 回答2: Yes, you can. But before you can, follow these steps: In Visual

Why does the BuildConfig class use Boolean.parseBoolean() instead of literal values?

烈酒焚心 提交于 2019-12-01 15:25:17
When looking at the BuildConfig class generated by Android Studio and the Gradle plugin one can see that the BuildConfig.DEBUG field is initialized using the Boolean.parseBoolean(String) call instead of using one of the boolean literals true or false . When I add custom build properties using Gradle I would simply do it like this: android { buildTypes.debug.buildConfigField 'boolean', 'SOME_SETTING', 'true' } But looking at the generated BuildConfig tells me that Google has taken a different approach with the DEBUG flag: public final class BuildConfig { public static final boolean DEBUG =