diff --git a/.gitignore b/.gitignore index b1de7ee..24d7d2b 100644 --- a/.gitignore +++ b/.gitignore @@ -32,5 +32,6 @@ app/app.iml ehthumbs.db Thumbs.db +app/.externalNativeBuild app/app-all-release.apk diff --git a/app/build.gradle b/app/build.gradle index e9adc46..f0452d4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,29 +1,35 @@ -apply plugin: 'com.android.model.application' -model { - android { - compileSdkVersion 24 - buildToolsVersion "25.0.2" +apply plugin: 'com.android.application' +android { + compileSdkVersion 24 + buildToolsVersion "27.0.3" - defaultConfig { - applicationId "org.ab.x48" - minSdkVersion.apiLevel 9 - targetSdkVersion.apiLevel 24 - } + defaultConfig { + applicationId "org.ab.x48" + minSdkVersion 16 + targetSdkVersion 24 - ndk { - moduleName "droid48" - ldLibs.addAll(["android", "log"]) - platformVersion = "9" - } - - productFlavors { - create("all") { - // If ndk.abiFilters is not configured, the application - // compile and package all suppported ABI. + externalNativeBuild { + cmake { + arguments "-DANDROID_PLATFORM=android-16" } } } + + externalNativeBuild { + cmake { + path "src/main/jni/CMakeLists.txt" + } + } + + splits { + abi { + enable true + reset() + include 'armeabi', 'mips', 'x86' + } + } + } dependencies { - compile 'com.getkeepsafe.relinker:relinker:1.2.2' + compile 'com.getkeepsafe.relinker:relinker:1.2.3' } \ No newline at end of file diff --git a/app/src/main/jni/CMakeLists.txt b/app/src/main/jni/CMakeLists.txt new file mode 100644 index 0000000..17cf29c --- /dev/null +++ b/app/src/main/jni/CMakeLists.txt @@ -0,0 +1,30 @@ +# +# Copyright (C) The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +cmake_minimum_required(VERSION 3.4.1) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=format-security") + +add_library(droid48 SHARED + actions.c binio.c debugger.c device.c + disasm.c emulate.c init.c + lcd.c main.c memory.c options.c register.c + resources.c romio.c rpl.c serial.c timer.c x48.c) + +# add lib dependencies +target_link_libraries(droid48 + android + log) \ No newline at end of file diff --git a/build.gradle b/build.gradle index b404859..74ff084 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { maven { url "https://jitpack.io" } } dependencies { - classpath 'com.android.tools.build:gradle-experimental:0.8.3' + classpath 'com.android.tools.build:gradle:3.0.1' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4dff042..82eefe7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Dec 18 14:21:50 CET 2016 +#Thu Oct 26 23:13:36 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip