-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a66275
commit 15db875
Showing
14 changed files
with
146 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
plugins { | ||
id 'com.android.library' version '8.1.1' | ||
id 'org.jetbrains.kotlin.android' version '1.9.10' | ||
} | ||
|
||
version = gradle.ext.version | ||
|
||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// Use JUnit Jupiter for testing. | ||
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2' | ||
|
||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher' | ||
|
||
// https://mvnrepository.com/artifact/com.google.code.gson/gson | ||
implementation group: 'com.google.code.gson', name: 'gson', version: gradle.ext.gsonVersion | ||
|
||
// https://mvnrepository.com/artifact/jakarta.validation/jakarta.validation-api | ||
implementation group: 'jakarta.validation', name: 'jakarta.validation-api', version: gradle.ext.jakartaValidationVersion | ||
|
||
// https://mvnrepository.com/artifact/jakarta.annotation/jakarta.annotation-api | ||
implementation group: 'jakarta.annotation', name: 'jakarta.annotation-api', version: gradle.ext.jakartaAnnotationVersion | ||
|
||
implementation group: 'com.microsoft.onnxruntime', name: 'onnxruntime-android', version: gradle.ext.onnxruntimeVersion | ||
} | ||
|
||
// Apply a specific Java toolchain to ease working on different environments. | ||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(8) | ||
} | ||
} | ||
|
||
android { | ||
compileSdkVersion 26 | ||
|
||
defaultConfig { | ||
minSdkVersion 26 | ||
targetSdkVersion 26 | ||
} | ||
namespace "jp.hiroshiba.voicevoxcore" | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
sourceSets { | ||
main { | ||
jniLibs.srcDirs = ["./src/main/resources/jniLibs"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
crates/voicevox_core_java_api/lib/src/main/resources/jniLibs/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
このディレクトリに Android での JNI 用に読み込まれる DLL を配置します。 | ||
ディレクトリ名は以下のうちのいずれかになります。 | ||
|
||
- `arm64-v8a` | ||
- `x86_64` |
Empty file removed
0
crates/voicevox_core_java_api/lib/src/main/resources/jniLibs/arm64-x8a/.gitkeep
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,44 @@ | ||
pluginManagement { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
|
||
resolutionStrategy { | ||
eachPlugin { | ||
if(requested.id.namespace == "com.android") { | ||
useModule("com.android.tools.build:gradle:${requested.version}") | ||
} | ||
} | ||
} | ||
} | ||
plugins { | ||
// Apply the foojay-resolver plugin to allow automatic download of JDKs | ||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' | ||
} | ||
|
||
rootProject.name = 'jp.hiroshiba.voicevoxcore' | ||
def String targetOs = System.getenv('OS')?.toLowerCase() ?: "desktop" | ||
def boolean isAndroid = targetOs == 'android' | ||
include('lib') | ||
if (isAndroid) { | ||
project(':lib').buildFileName = 'build-android.gradle' | ||
} else { | ||
project(':lib').buildFileName = 'build.gradle' | ||
} | ||
|
||
def String cargoToml = file('../../Cargo.toml').text | ||
def String cargoTomlVersion = (cargoToml =~ /(?m)^version = "(\S+)"$/)[0][1] | ||
|
||
gradle.ext { | ||
version = cargoTomlVersion | ||
|
||
targetOs = targetOs | ||
targetDevice = System.getenv('DEVICE') ?: 'cpu' | ||
|
||
gsonVersion = '2.10.1' | ||
jakartaValidationVersion = '3.0.2' | ||
jakartaAnnotationVersion = '2.1.1' | ||
onnxruntimeVersion = '1.14.0' | ||
} |