Skip to content

Commit

Permalink
Java support: #4
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaciejm committed Dec 4, 2024
1 parent 8b53c33 commit 9b646c2
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ expected to be called only once per app's lifecycle, so the best place for doing
of your app's `Application` class.

```kotlin
import com.securevale.rasp.android.native.SecureApp
import com.securevale.rasp.android.SecureApp

class SampleApplication : Application() {

Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ plugins {
id("com.vanniktech.maven.publish") version "0.25.2"
}

val versionCode by extra { 6 }
val versionName by extra { "0.6.0" }
val versionCode by extra { 7 }
val versionName by extra { "0.6.3" }
val minSdkVersion by extra { 24 }
val compileSdkVersion by extra { 34 }
val targetSdkVersion by extra { 34 }
Expand Down
2 changes: 1 addition & 1 deletion native/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const EXTENDED_LOGGING: bool = false;

#[allow(clippy::missing_safety_doc)]
#[no_mangle]
pub unsafe extern "C" fn Java_com_securevale_rasp_android_native_SecureApp_initJni(
pub unsafe extern "C" fn Java_com_securevale_rasp_android_SecureApp_initJni(
_env: JNIEnv,
_class: JClass,
) {
Expand Down
9 changes: 5 additions & 4 deletions rasp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android {
buildTypes {
getByName("release") {
isMinifyEnabled = false
consumerProguardFiles( "consumer-rules.pro")
consumerProguardFiles("consumer-rules.pro")
}

getByName("debug") {
Expand Down Expand Up @@ -93,12 +93,13 @@ fun configureDokka(dokkaTask: DokkaTask, outputDir: String) = dokkaTask.apply {
}

mavenPublishing {

group = "com.securevale.rasp"
version = "0.6.0"
coordinates("com.securevale", "rasp-android", "0.6.0")
version = rootProject.extra["versionName"] as String
coordinates("com.securevale", "rasp-android", rootProject.extra["versionName"] as String)

publishToMavenCentral(SonatypeHost.S01, true)
signAllPublications()
// signAllPublications()

pom {
name.set("Android RASP")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.securevale.rasp.android.native
package com.securevale.rasp.android

/**
* Library initalisation object.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.securevale.rasp.android.sample

import android.app.Application
import com.securevale.rasp.android.native.SecureApp
import com.securevale.rasp.android.SecureApp

class SampleApplication : Application() {

Expand Down
Binary file modified sample-app/src/main/jniLibs/arm64-v8a/libnative.so
Binary file not shown.
Binary file modified sample-app/src/main/jniLibs/armeabi-v7a/libnative.so
Binary file not shown.
Binary file modified sample-app/src/main/jniLibs/x86/libnative.so
Binary file not shown.
Binary file modified sample-app/src/main/jniLibs/x86_64/libnative.so
Binary file not shown.

0 comments on commit 9b646c2

Please sign in to comment.