-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust JNI loading for Android and bump Skia to m120 (#47)
- Loading branch information
1 parent
e50e838
commit 7eeedcb
Showing
53 changed files
with
562 additions
and
959 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
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
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
Submodule skia
updated
from beb4d7 to 349c11
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,38 +1,73 @@ | ||
import com.android.build.gradle.internal.api.BaseVariantOutputImpl | ||
import com.android.build.gradle.internal.tasks.factory.dependsOn | ||
|
||
plugins { | ||
id("java-library") | ||
id("com.android.library") | ||
`maven-publish` | ||
signing | ||
} | ||
|
||
java { | ||
toolchain{ | ||
languageVersion.set(JavaLanguageVersion.of(17)) | ||
} | ||
withSourcesJar() | ||
withJavadocJar() | ||
dependencies { | ||
implementation(project(":main")) | ||
} | ||
|
||
tasks.jar { | ||
archiveBaseName = "alphaSkia-android" | ||
tasks.register<Copy>("copyJniForAndroid") { | ||
// https://developer.android.com/studio/projects/gradle-external-native-builds#jniLibs | ||
// https://developer.android.com/ndk/guides/abis#sa | ||
|
||
into("native/android-x64/") { | ||
into("src/main/jniLibs/x86_64") { | ||
from(rootProject.projectDir.resolve("../../dist/libalphaskiajni-android-x64-jni/")) { | ||
include("*.so") | ||
} | ||
} | ||
into("native/android-x86/") { | ||
into("src/main/jniLibs/x86") { | ||
from(rootProject.projectDir.resolve("../../dist/libalphaskiajni-android-x86-jni/")) { | ||
include("*.so") | ||
} | ||
} | ||
into("native/android-arm64/") { | ||
into("src/main/jniLibs/arm64-v8a") { | ||
from(rootProject.projectDir.resolve("../../dist/libalphaskiajni-android-arm64-jni/")) { | ||
include("*.so") | ||
} | ||
} | ||
into("native/android-arm/") { | ||
into("src/main/jniLibs/armeabi-v7a") { | ||
from(rootProject.projectDir.resolve("../../dist/libalphaskiajni-android-arm-jni/")) { | ||
include("*.so") | ||
} | ||
} | ||
} | ||
|
||
destinationDir = projectDir | ||
} | ||
tasks.preBuild.dependsOn("copyJniForAndroid") | ||
|
||
|
||
android { | ||
namespace = "net.alphatab.alphaskia.android" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
minSdk = 26 | ||
ndk { | ||
abiFilters += listOf("x86", "x86_64", "armeabi-v7a", "arm64-v8a") | ||
} | ||
setProperty("archivesBaseName", "alphaSkia-android") | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
publishing { | ||
singleVariant("release") { | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.