Skip to content

Commit 3add86e

Browse files
committed
fix for gradle tools 9
1 parent 891c9ee commit 3add86e

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

android/hooks/build.gradle.ejs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ repositories {
1515
// Android build settings for this library project.
1616
android {
1717
namespace '<%- moduleId %>'
18-
compileSdkVersion <%- compileSdkVersion %>
18+
compileSdk <%- compileSdkVersion %>
1919
defaultConfig {
20-
minSdkVersion <%- minSdkVersion %>
21-
targetSdkVersion <%- targetSdkVersion %>
20+
minSdk <%- minSdkVersion %>
21+
targetSdk <%- targetSdkVersion %>
2222
}
23-
lintOptions {
23+
lint {
2424
checkReleaseBuilds false
2525
}
2626
}
@@ -53,12 +53,12 @@ task generateJarDependenciesFile() {
5353

5454
// Add the main Android framework JAR to the collection.
5555
jarPathCollection.add(
56-
file("${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar").toString())
56+
file('<%- sdkDir %>/platforms/android-<%- compileSdkVersion %>/android.jar').toString())
5757

5858
// Fetch JAR paths to all dependencies referenced by this gradle script and "./platform/android/build.gradle".
59-
project.android.libraryVariants.all { variant ->
60-
variant.getCompileClasspath(null).each {
61-
def fileObject = it
59+
def compileClasspath = configurations.findByName('compileClasspath')
60+
if (compileClasspath != null) {
61+
compileClasspath.files.each { fileObject ->
6262
def filePath = fileObject.toString()
6363
if (!filePath.startsWith(buildDir.toString()) && fileObject.exists()) {
6464
jarPathCollection.add(filePath)

android/hooks/hyperloop.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ exports.cliVersion = '>=3.2';
167167
compileSdkVersion: this.builder.targetSDK,
168168
moduleId: this.builder.moduleId,
169169
minSdkVersion: this.builder.minSDK,
170+
sdkDir: this.builder.androidInfo.sdk.path.replace(/\\/g, '\\\\'),
170171
targetSdkVersion: this.builder.targetSDK,
171172
tiMavenUrl: encodeURI('file://' + path.join(this.builder.platformPath, 'm2repository').replace(/\\/g, '/')),
172173
tiProjectPlatformAndroidDir: path.join(this.builder.projectDir, 'platform', 'android'),

0 commit comments

Comments
 (0)