Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AndroidExtension |
|
| 2.5;2.5 |
1 | package com.simpligility.maven.plugins.androidndk.common; | |
2 | ||
3 | /** | |
4 | * The file system extension for the Android artifact also used for the packaging type of an Android Maven Project. | |
5 | */ | |
6 | public final class AndroidExtension | |
7 | { | |
8 | /** | |
9 | * Android application. | |
10 | */ | |
11 | public static final String APK = "apk"; | |
12 | ||
13 | /** | |
14 | * Android library project as created by Android Maven Plugin. | |
15 | */ | |
16 | public static final String APKLIB = "apklib"; | |
17 | ||
18 | /** | |
19 | * Android archive as introduced by the Gradle Android build system (modelled after apklib with extensions and some | |
20 | * differences). | |
21 | */ | |
22 | public static final String AAR = "aar"; | |
23 | ||
24 | ||
25 | /** | |
26 | * @deprecated Use {@link APKLIB} instead. | |
27 | */ | |
28 | public static final String APKSOURCES = "apksources"; | |
29 | ||
30 | ||
31 | //No instances | |
32 | private AndroidExtension() | |
33 | 0 | { |
34 | 0 | } |
35 | ||
36 | ||
37 | /** | |
38 | * Determine whether or not a {@link MavenProject}'s packaging is an | |
39 | * Android project. | |
40 | * | |
41 | * @param packaging Project packaging. | |
42 | * @return True if an Android project. | |
43 | */ | |
44 | public static boolean isAndroidPackaging( String packaging ) | |
45 | { | |
46 | 0 | return APK.equals( packaging ) || APKLIB.equals( packaging ) || APKSOURCES.equals( packaging ) |
47 | || AAR.equalsIgnoreCase( packaging ); | |
48 | } | |
49 | } |