mirror of
https://github.com/mrxenginner/reVC.git
synced 2026-10-11 17:58:17 +08:00
[android] Minimal Refactor
This commit is contained in:
1 parent
09eb2058bb
commit
b12a085a2f
6 files changed
+172
-11
No files matched your search
@@ -3,6 +3,7 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
namespace 'com.revc.game'
|
||||
compileSdk 35
|
||||
|
||||
@@ -13,36 +14,81 @@ android {
|
||||
versionCode 1
|
||||
versionName "reVC-0.0.1"
|
||||
|
||||
ndkVersion '27.2.12479018'
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
cppFlags '-std=c++11'
|
||||
}
|
||||
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a"/*, "arm64-v8a"*/
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
signingConfig signingConfigs.debug
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
cppFlags '-O3', '-fvisibility=hidden'
|
||||
}
|
||||
}
|
||||
|
||||
debuggable false
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
jniDebuggable false
|
||||
renderscriptDebuggable false
|
||||
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
|
||||
debug {
|
||||
signingConfig signingConfigs.debug
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
cppFlags '-g', '-DDEBUG'
|
||||
}
|
||||
}
|
||||
|
||||
debuggable true
|
||||
minifyEnabled false
|
||||
jniDebuggable true
|
||||
renderscriptDebuggable true
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
jniLibs.excludes += ['META-INF/*']
|
||||
resources.excludes += ['META-INF/*']
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path file('CMakeLists.txt')
|
||||
version '3.22.1'
|
||||
}
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
buildConfig = true
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
jniLibs.srcDir 'jniLibs'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
|
||||
implementation libs.appcompat
|
||||
implementation libs.material
|
||||
|
||||
+42
-2
@@ -14,8 +14,48 @@
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
# -keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-renamesourcefileattribute SourceFile
|
||||
|
||||
-dontusemixedcaseclassnames
|
||||
-dontskipnonpubliclibraryclasses
|
||||
-verbose
|
||||
|
||||
# If you want to enable optimization, you should include the comenta o proguard pra ve
|
||||
# following:
|
||||
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
|
||||
-optimizationpasses 5
|
||||
-allowaccessmodification
|
||||
|
||||
# Specify the package name to apply string encryption
|
||||
-keeppackagenames com.revc.game
|
||||
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
|
||||
-dontwarn com.revc.game.MainActivity*
|
||||
-keep class com.revc.game.MainActivity { *; }
|
||||
|
||||
-dontwarn androidx.**
|
||||
-keep class androidx.** { *; }
|
||||
|
||||
-dontwarn org.ini4j.**
|
||||
-keep class org.ini4j.** { *; }
|
||||
|
||||
-repackageclasses 'a'
|
||||
|
||||
-keepattributes Exceptions, InnerClasses, Signature, Deprecated, SourceFile,
|
||||
LineNumberTable, *Annotation*, EnclosingMethod
|
||||
-dontwarn android.webkit.JavascriptInterface
|
||||
|
||||
-dontwarn org.jetbrains.annotations.**
|
||||
|
||||
-assumenosideeffects class android.util.Log {
|
||||
public static *** d(...);
|
||||
public static *** v(...);
|
||||
public static *** w(...);
|
||||
public static *** i(...);
|
||||
}
|
||||
@@ -1,8 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="MissingLeanbackLauncher">
|
||||
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission-sdk-23 android:name="android.permission.READ_MEDIA_AUDIO"/>
|
||||
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="32"
|
||||
tools:ignore="ScopedStorage" />
|
||||
<uses-permission
|
||||
android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="32" />
|
||||
|
||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
||||
|
||||
<uses-feature
|
||||
android:glEsVersion="0x00020000"
|
||||
android:required="true"/>
|
||||
<uses-feature
|
||||
android:name="android.hardware.touchscreen"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.software.leanback"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.bluetooth"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.microphone"
|
||||
android:required="false" />
|
||||
|
||||
<supports-screens
|
||||
android:anyDensity="true"
|
||||
android:largeScreens="true"
|
||||
android:normalScreens="true"
|
||||
android:resizeable="true"
|
||||
android:smallScreens="true" />
|
||||
|
||||
<application
|
||||
android:gwpAsanMode="always"
|
||||
android:isGame="true"
|
||||
android:appCategory="game"
|
||||
android:allowAudioPlaybackCapture="true"
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
@@ -10,8 +61,11 @@
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:theme="@style/Theme.ReVC"
|
||||
tools:targetApi="31">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
@@ -21,6 +75,20 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/provider_paths" />
|
||||
</provider>
|
||||
|
||||
<meta-data
|
||||
android:name="android.max_aspect"
|
||||
android:value="2.1" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -11,7 +11,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
// Used to load the 'game' library on application startup.
|
||||
static {
|
||||
System.loadLibrary("revc");
|
||||
//System.loadLibrary("revc");
|
||||
}
|
||||
|
||||
private ActivityMainBinding binding;
|
||||
@@ -25,12 +25,12 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
// Example of a call to a native method
|
||||
TextView tv = binding.sampleText;
|
||||
tv.setText(stringFromJNI());
|
||||
// tv.setText(stringFromJNI());
|
||||
}
|
||||
|
||||
/**
|
||||
* A native method that is implemented by the 'game' native library,
|
||||
* which is packaged with this application.
|
||||
*/
|
||||
public native String stringFromJNI();
|
||||
//public native String stringFromJNI();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<paths>
|
||||
<external-path
|
||||
name="external_download"
|
||||
path="." />
|
||||
</paths>
|
||||
Whitespace-only changes.
Reference in new issue
Block a user