私の(gradle 1.10およびgradle plugin 0.8)ベースのAndroidプロジェクトは、3つの異なるAndroidアプリの依存関係である大きなAndroidライブラリで構成されています
私のライブラリでは、このような構造を使用できるようにしたいと考えています
if (BuildConfig.SOME_FLAG) {
callToBigLibraries()
}
プロガードは、SOME_FLAG の最終値に基づいて、生成された apk のサイズを縮小できるため
しかし、gradle as でそれを行う方法がわかりません:
* the BuildConfig produced by the library doesn't have the same package name than the app
* I have to import the BuildConfig with the library package in the library
* The apk of an apps includes the BuildConfig with the package of the app but not the one with the package of the library.
BuildTypes などで遊んでみましたが成功しませんでした
release {
// packageNameSuffix "library"
buildConfigField "boolean", "SOME_FLAG", "true"
}
debug {
//packageNameSuffix "library"
buildConfigField "boolean", "SOME_FLAG", "true"
}
アプリのビルド時にフラグがオーバーライドされるライブラリとアプリの共有 BuildConfig をビルドする正しい方法は何ですか?