Skip to content

Commit

Permalink
[android] Fixes android build issue for slf4j2.x (#3384)
Browse files Browse the repository at this point in the history
Co-authored-by: nobody <nobody@localhost>
  • Loading branch information
frankfliu and nobody authored Aug 5, 2024
1 parent e03f0ec commit 904c971
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.1'
classpath 'com.android.tools.build:gradle:8.5.1'
}
}

Expand Down
11 changes: 8 additions & 3 deletions android/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apply plugin: 'maven-publish'
apply plugin: 'signing'

android {
compileSdkVersion 33
buildToolsVersion "30.0.3"
compileSdkVersion 34
namespace "ai.djl.android.core"

defaultConfig {
minSdkVersion 26
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"

Expand All @@ -25,6 +25,11 @@ android {
sourceCompatibility = 11
targetCompatibility = 11
}
publishing {
singleVariant("release") {
withSourcesJar()
}
}
}

signing {
Expand Down
3 changes: 1 addition & 2 deletions android/core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ai.djl.android.core">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- TODO: remove network permission requirement -->
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
13 changes: 9 additions & 4 deletions android/pytorch-native/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apply plugin: 'maven-publish'
apply plugin: 'signing'

android {
compileSdkVersion 33
buildToolsVersion "30.0.3"
compileSdkVersion 34
namespace "ai.djl.android.pytorch_native"

defaultConfig {
minSdkVersion 24
targetSdkVersion 33
minSdkVersion 26
targetSdkVersion 34
versionCode 1
versionName "1.0"

Expand All @@ -27,6 +27,11 @@ android {
jniLibs.srcDirs = ["jnilib/"]
}
}
publishing {
singleVariant("release") {
withSourcesJar()
}
}
}

// TODO: Making publish as an individual gradle file
Expand Down
3 changes: 1 addition & 2 deletions android/pytorch-native/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ai.djl.android.pytorch_native" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android"/>

0 comments on commit 904c971

Please sign in to comment.