add java android demo (#1454)
This commit is contained in:
1
android/SherpaOnnxJavaDemo/sherpa/.gitignore
vendored
Normal file
1
android/SherpaOnnxJavaDemo/sherpa/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
43
android/SherpaOnnxJavaDemo/sherpa/build.gradle
Normal file
43
android/SherpaOnnxJavaDemo/sherpa/build.gradle
Normal file
@@ -0,0 +1,43 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.k2fsa.sherpa'
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
minSdk 26
|
||||
targetSdk 27
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
missingDimensionStrategy 'base', 'feature1'
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
// implementation "androidx.appcompat"
|
||||
// implementation libs.material
|
||||
// testImplementation libs.junit
|
||||
// androidTestImplementation libs.androidx.test.ext.junit
|
||||
// androidTestImplementation libs.espresso.core
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'com.google.android.material:material:1.9.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
||||
|
||||
}
|
||||
21
android/SherpaOnnxJavaDemo/sherpa/proguard-rules.pro
vendored
Normal file
21
android/SherpaOnnxJavaDemo/sherpa/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true" />
|
||||
|
||||
</manifest>
|
||||
1
android/SherpaOnnxJavaDemo/sherpa/src/main/java/com
Symbolic link
1
android/SherpaOnnxJavaDemo/sherpa/src/main/java/com
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../../../../sherpa-onnx/sherpa-onnx/java-api/src/com
|
||||
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">sherpa</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user