Badge request: supported Android version
- Dominant language
- JavaScript
- Stars
- 27.2k
- Forks
- 5.6k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 46
Description
:clipboard: **Description**
Similar to the python badge, I would propose adding support for the following Android badges:
* Android version >= (number)
* Android version >= (name)
Please note: ranges will be dealt with in a separate issue.
:link: **Data**
Data has to be gathered from a build.gradle file ([example](https://github.com/clemensbartz/essential-launcher/blob/release/v1.6/launcher/build.gradle)):
````
android {
compileSdkVersion 28
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "de.clemensbartz.android.launcher"
minSdkVersion 17
targetSdkVersion 28
maxSdkVersion 28
versionCode 12
versionName "1.5"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
````
This has the following challenges:
- module may not be named "app" (see example above), specification necessary
- module may have constants from root to get the version from (e. g. [child](https://github.com/shadowsocks/shadowsocks-android/blob/master/mobile/build.gradle) -> [root](https://github.com/shadowsocks/shadowsocks-android/blob/master/build.gradle))
`build.gradle` is the only place to define it, since when you define the constants outside, you get the following errors (this holds true for Android Studio 3.2 and Gradle 28.0.2):
* minSdk: `The minSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file.`
I would also be able to do the implementation.
Contributor guide
Research direction
Start by reviewing the existing Python badge implementation and the linked build.gradle examples. Define how module selection and values inherited from the root project are handled, then add Android minimum-version badges by number and name; range support remains out of scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript
- Domain
- mobile-dev, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100