10: Update UsesSdkPlugin to check maxSdkVersion definition
This commit is contained in:
@@ -24,6 +24,10 @@ public class UsesSdkPlugin extends AndroidManifestPlugin {
|
||||
if(usesSdkNode.getAttributes().getNamedItem("android:minSdkVersion") == null) {
|
||||
addIssue(Severity.ERROR, ".USES_SDK.NO_MIN_SDK_VERSION", null, null);
|
||||
}
|
||||
|
||||
Optional.ofNullable(usesSdkNode.getAttributes().getNamedItem("android:maxSdkVersion")).ifPresent(maxSdkVersion ->
|
||||
addIssue(Severity.ERROR, ".USES_SDK.MAX_SDK_VERSION", null, maxSdkVersion.toString())
|
||||
);
|
||||
}, () -> addIssue(Severity.ERROR, ".NO_USES_SDK", null, null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,12 @@ com.bartek.esa.core.plugin.UsesSdkPlugin.USES_SDK.NO_MIN_SDK_VERSION=There is no
|
||||
In order to use this tool, minimal SDK version should be provided as the attribute of <uses-sdk> element.\n\
|
||||
For example: <uses-sdk android:minSdkVersion="23">
|
||||
|
||||
com.bartek.esa.core.plugin.UsesSdkPlugin.USES_SDK.MAX_SDK_VERSION=Application defines an upper limit for API version.\n\
|
||||
The android:maxSdkVersion is defined in AndroidManifest.xml.\n\
|
||||
There is no need to limit available platforms for application.\n\
|
||||
Furthermore it can cause unexpected application uninstall\n\
|
||||
on upgrading Android version (along with API which can exceed defined maximal API version).
|
||||
|
||||
com.bartek.esa.core.plugin.CipherInstancePlugin=Not fully-qualified algorithm name provided in Cipher.getInstance() method.\n\
|
||||
Passing a shortcut instead of fully-qualified algorithm name in Cipher.getInstance() method is not portable across providers\n\
|
||||
and can impact the system low secure than intended to be.\n\
|
||||
|
||||
Reference in New Issue
Block a user