Skip to content

Commit

Permalink
Revert "Use make instead of cmake"
Browse files Browse the repository at this point in the history
This reverts commit 689cf7d.
  • Loading branch information
DerGoogler committed Oct 27, 2023
1 parent cd915b2 commit c3aa614
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 27 deletions.
11 changes: 4 additions & 7 deletions Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ android {
arguments "-DANDROID_STL=c++_shared"
}
}

project.tasks.preBuild.dependsOn("webProd")

ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
Expand All @@ -46,7 +43,7 @@ android {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
multiDexEnabled true
// project.tasks.preBuild.dependsOn("webProd")
project.tasks.preBuild.dependsOn("webProd")
}
debug {
resValue "string", "app_name", "${app_name} Debug"
Expand All @@ -55,12 +52,12 @@ android {
minifyEnabled false
multiDexEnabled false
applicationIdSuffix '.debug'
// project.tasks.preBuild.dependsOn("webDev")
project.tasks.preBuild.dependsOn("webDev")
}
}
externalNativeBuild {
ndkBuild {
path("src/main/cpp/Android.mk")
cmake {
path = file("src/main/cpp/CMakeLists.txt")
}
}
compileOptions {
Expand Down
17 changes: 0 additions & 17 deletions Android/app/src/main/cpp/Android.mk

This file was deleted.

22 changes: 22 additions & 0 deletions Android/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Sets the minimum version of CMake required to build your native library.
# This ensures that a certain set of CMake features is available to
# your build.


cmake_minimum_required(VERSION 3.4.1)

# Specifies a library name, specifies whether the library is STATIC or
# SHARED, and provides relative paths to the source code. You can
# define multiple libraries by adding multiple add_library() commands,
# and CMake builds them for you. When you build your app, Gradle
# automatically packages shared libraries with your APK.


add_library(native-log-lib SHARED
log.cpp)

add_library(native-properties-lib SHARED
properties.cpp)

add_library(native-shell-lib SHARED
shell.cpp)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
public class NativeLog {

static {
System.loadLibrary("clog");
System.loadLibrary("native-log-lib");
}

@JavascriptInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
public class NativeProperties {

static {
System.loadLibrary("properties");
System.loadLibrary("native-properties-lib");
}

@JavascriptInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public NativeShell(WebView wv) {
}

static {
System.loadLibrary("shell");
System.loadLibrary("native-shell-lib");
}

@JavascriptInterface
Expand Down

0 comments on commit c3aa614

Please sign in to comment.