5

Which is the right place to specify android's library project version code/name? Whats the current state on a library's Android Manifest? When you bundle a library jar, can AndroidManifest be ignored while bundling jar and still delivering a usable/unbroken jar?

My question is related with this

Community
  • 1
  • 1
bianca
  • 7,004
  • 12
  • 43
  • 58

2 Answers2

1

You set version code/ name of a project in its AndroidManifest.xml. But if it's a library project, all information in the manifest will be ignored after integrating into the host project.

There is an issue.

1
BuildConfig.VERSION_NAME
BuildConfig.VERSION_CODE

Just make sure that you import the BuildConfig for your library (as literally every android library/app has it's own BuildConfig on it's package path). The Android Studio's Gradle Build system indicates that this is always generated as of version 0.7.0 (see changelog). This persists as a generated class into the hosting app/library.

JCricket
  • 1,318
  • 2
  • 17
  • 34