File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
src/main/groovy/com/monits/gradle/sca Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,14 @@ final class AndroidHelper {
133133 home
134134 }
135135
136+ /**
137+ * Retrieves the current Android SDK install location
138+ * @return The current Android SDK install location
139+ */
140+ static String getSdkDir () {
141+ System . getenv(' ANDROID_HOME' )
142+ }
143+
136144 /**
137145 * Retrieves the current plugin version, if available.
138146 * @param project The project on which to analyze the used plugin version.
Original file line number Diff line number Diff line change @@ -101,6 +101,11 @@ trait ClasspathAware {
101101 FileCollection mockableAndroidJar = project. files()
102102 if (mockableAndroidJarTask) {
103103 mockableAndroidJar + = mockableAndroidJarTask. outputs. files
104+ } else {
105+ // as of 3.2.0+ the mockableAndroidJar task is no more… attempt to access directly
106+ mockableAndroidJar + = project. files(
107+ AndroidHelper . sdkDir + " /platforms/${ project['android']['compileSdkVersion']} /android.jar" ,)
108+ // System.getenv('JAVA_HOME') + '/jre/lib/rt.jar')
104109 }
105110
106111 task. setProperty(' classpath' ,
You can’t perform that action at this time.
0 commit comments