xref: /aosp_15_r20/external/pytorch/android/pytorch_android/host/build.gradle (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1// Copyright (c) Facebook, Inc. and its affiliates.
2//
3// This source code is licensed under the Apache-2 license found in the
4// LICENSE file in the root directory of this source tree.
5
6plugins {
7    id 'java-library'
8}
9
10repositories {
11    mavenLocal()
12    jcenter()
13}
14
15sourceSets {
16    main {
17        java {
18            srcDir '../src/main/java'
19            exclude 'org/pytorch/PyTorchAndroid.java'
20            exclude 'org/pytorch/LitePyTorchAndroid.java'
21            exclude 'org/pytorch/LiteModuleLoader.java'
22            exclude 'org/pytorch/LiteNativePeer.java'
23        }
24    }
25    test {
26        java {
27            srcDir '../src/androidTest/java'
28            exclude '**/PytorchInstrumented*'
29            exclude '**/PytorchLiteInstrumented*'
30        }
31        resources.srcDirs = ["../src/androidTest/assets"]
32    }
33}
34
35dependencies {
36    compileOnly 'com.google.code.findbugs:jsr305:3.0.1'
37    implementation 'com.facebook.soloader:nativeloader:0.10.1'
38    implementation 'com.facebook.fbjni:fbjni-java-only:0.2.2'
39    testImplementation 'junit:junit:4.12'
40}
41
42apply from: rootProject.file('gradle/release.gradle')
43