Is it possible to do gradle release and debug builds in non-Android project?

左心房为你撑大大i 提交于 2020-02-03 08:20:38

问题


I'm building a REST Client Api that will be now used in a desktop java application as well as an Android app. With the android gradle plugin, you can specify buildConfigFields in buildTypes for server urls so the debug build would point to test server and release build would point to production server

How can I accomplish this without using the android gradle plugin? I only know the basics in Gradle but could this be accomplished easily with a gradle task?

来源:https://stackoverflow.com/questions/44050420/is-it-possible-to-do-gradle-release-and-debug-builds-in-non-android-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!