Kotlin Native Jni Stub
This commit is contained in:
1 parent
62f126b5d9
commit
5650ee580f
4 files changed
+27
-1
No files matched your search
@@ -0,0 +1 @@
|
||||
/build
|
||||
@@ -0,0 +1,11 @@
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
androidNativeArm64("native") {
|
||||
binaries {
|
||||
sharedLib("ehviewer-kotlin-native")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package moe.tarsin.ehviewer
|
||||
|
||||
import kotlinx.cinterop.CPointer
|
||||
import kotlinx.cinterop.invoke
|
||||
import kotlinx.cinterop.pointed
|
||||
import platform.android.JNIEnvVar
|
||||
import platform.android.jclass
|
||||
import platform.android.jobject
|
||||
|
||||
@CName("Java_com_hippo_Native_rewriteGif")
|
||||
fun rewriteGif(env: CPointer<JNIEnvVar>, thiz: jclass, buffer: jobject) {
|
||||
val ptr = env.pointed.pointed!!.GetDirectBufferAddress!!.invoke(env, buffer)
|
||||
}
|
||||
+2
-1
@@ -6,7 +6,7 @@ pluginManagement {
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
@@ -18,3 +18,4 @@ dependencyResolutionManagement {
|
||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||
rootProject.name = "EhViewer"
|
||||
include ':app'
|
||||
include ':native'
|
||||
Reference in new issue
Block a user