Skip to content

Commit efdd8f2

Browse files
committed
Update
1 parent f86d7e3 commit efdd8f2

File tree

16 files changed

+100
-28
lines changed

16 files changed

+100
-28
lines changed

extension/android/BUCK

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ oncall("executorch")
55
fb_android_library(
66
name = "executorch",
77
srcs = [
8-
"src/main/java/org/pytorch/executorch/DType.java",
9-
"src/main/java/org/pytorch/executorch/EValue.java",
10-
"src/main/java/org/pytorch/executorch/Module.java",
11-
"src/main/java/org/pytorch/executorch/NativePeer.java",
12-
"src/main/java/org/pytorch/executorch/Tensor.java",
13-
"src/main/java/org/pytorch/executorch/annotations/Experimental.java",
8+
"executorch_android/src/main/java/org/pytorch/executorch/DType.java",
9+
"executorch_android/src/main/java/org/pytorch/executorch/EValue.java",
10+
"executorch_android/src/main/java/org/pytorch/executorch/Module.java",
11+
"executorch_android/src/main/java/org/pytorch/executorch/NativePeer.java",
12+
"executorch_android/src/main/java/org/pytorch/executorch/Tensor.java",
13+
"executorch_android/src/main/java/org/pytorch/executorch/annotations/Experimental.java",
1414
],
1515
autoglob = False,
1616
language = "JAVA",
@@ -23,8 +23,8 @@ fb_android_library(
2323
fb_android_library(
2424
name = "executorch_llama",
2525
srcs = [
26-
"src/main/java/org/pytorch/executorch/LlamaCallback.java",
27-
"src/main/java/org/pytorch/executorch/LlamaModule.java",
26+
"executorch_android/src/main/java/org/pytorch/executorch/LlamaCallback.java",
27+
"executorch_android/src/main/java/org/pytorch/executorch/LlamaModule.java",
2828
],
2929
autoglob = False,
3030
language = "JAVA",

extension/android/build.gradle

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1-
/*
2-
* Copyright (c) Meta Platforms, Inc. and affiliates.
3-
* All rights reserved.
4-
*
5-
* This source code is licensed under the BSD-style license found in the
6-
* LICENSE file in the root directory of this source tree.
7-
*/
1+
allprojects {
2+
buildscript {
3+
ext {
4+
minSdkVersion = 21
5+
targetSdkVersion = 34
6+
compileSdkVersion = 34
7+
buildToolsVersion = '33.0.1'
88

9-
plugins {
10-
id 'java-library'
11-
}
9+
fbjniJavaOnlyVersion = "0.5.1"
10+
soLoaderNativeLoaderVersion = "0.10.5"
11+
}
1212

13-
group 'org.pytorch.executorch'
13+
repositories {
14+
google()
15+
mavenCentral()
16+
}
1417

15-
repositories {
16-
mavenCentral()
17-
}
18+
dependencies {
19+
classpath 'com.android.tools.build:gradle:8.9.0'
20+
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.31.0'
21+
}
22+
23+
}
1824

19-
task makeJar(type: Jar) {
20-
dependencies {
21-
implementation 'com.facebook.fbjni:fbjni-java-only:0.5.1'
22-
implementation 'com.facebook.soloader:nativeloader:0.10.5'
25+
repositories {
26+
google()
27+
jcenter()
28+
mavenCentral()
2329
}
2430
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
plugins {
10+
id "com.android.library" version "8.9.0"
11+
id "maven-publish"
12+
}
13+
14+
android {
15+
namespace = "org.pytorch.executorch"
16+
compileSdk = 34
17+
18+
defaultConfig {
19+
minSdk = 19
20+
21+
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
22+
}
23+
24+
compileOptions {
25+
sourceCompatibility = JavaVersion.VERSION_1_8
26+
targetCompatibility = JavaVersion.VERSION_1_8
27+
}
28+
}
29+
30+
dependencies {
31+
implementation 'com.facebook.fbjni:fbjni-java-only:0.5.1'
32+
implementation 'com.facebook.soloader:nativeloader:0.10.5'
33+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
POM_NAME=executorch_android ExecuTorch Android API
2+
POM_DESCRIPTION=executorch_android ExecuTorch Android API
3+
POM_ARTIFACT_ID=executorch_android
4+
POM_PACKAGING=aar
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.pytorch.executorch">
2+
<uses-sdk android:minSdkVersion="19" />
3+
</manifest>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)