合并打包功能代码

autoJS打包目前只能兼容V1版本的签名,而由于谷歌的限制,如果targetSdk为30或以上的话,打包的应用就无法安装,所以打包(构建时选择inrt分支)时需要将TARGET_SDK_VERSION设置为29或以下。
This commit is contained in:
Ai
2023-09-30 13:51:10 +08:00
committed by SuperMonster003
parent 4481f539f9
commit 330ae87f4c
23 changed files with 1141 additions and 182 deletions

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:fitsSystemWindows="true"
android:orientation="vertical">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:popupTheme="@style/AppTheme.PopupOverlay"/>
</com.google.android.material.appbar.AppBarLayout>
<org.autojs.autojs.core.console.ConsoleView
android:id="@+id/console"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:color_debug="#cc000000"
app:color_verbose="#dfc0c0c0"/>
</LinearLayout>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:fitsSystemWindows="true"
android:orientation="vertical">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:popupTheme="@style/AppTheme.PopupOverlay"/>
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
android:id="@+id/fragment_setting"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"/>
</LinearLayout>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:src="@drawable/autojs_material"/>
<TextView
android:id="@+id/slug"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="12dp"
android:text="@string/text_powered_by_autojs"
android:textColor="#dd000000"
android:textSize="14sp"/>
</FrameLayout>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/settings"
android:title="@string/text_settings"/>
</menu>

View File

@@ -75,4 +75,12 @@
<attr name="message" format="string" />
</declare-styleable>
<declare-styleable name="ConsoleView">
<attr name="color_debug" format="reference|color" />
<attr name="color_verbose" format="reference|color" />
<attr name="color_info" format="reference|color" />
<attr name="color_warn" format="reference|color" />
<attr name="color_error" format="reference|color" />
<attr name="color_assert" format="reference|color" />
</declare-styleable>
</resources>

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="@string/text_script_running">
<SwitchPreference
android:defaultValue="true"
android:key="@string/key_use_volume_control_running"
android:title="@string/text_use_volume_key_to_control_script_running"/>
<SwitchPreference
android:defaultValue="false"
android:key="@string/key_not_showing_main_activity"
android:summary="@string/summary_not_showing_main_activity"
android:title="@string/text_not_showing_main_activity"/>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/text_a11y_service">
<SwitchPreference
android:defaultValue="false"
android:key="@string/key_enable_a11y_service_with_root_access"
android:summary="@string/summary_enable_a11y_service_with_root_access"
android:title="@string/text_enable_a11y_service_with_root_access_automatically"/>
<SwitchPreference
android:defaultValue="false"
android:key="@string/key_stable_mode"
android:summary="@string/summary_stable_mode"
android:title="@string/text_stable_mode"/>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/text_others">
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="external_files" path="."/>
<files-path name="sample" path="sample"/>
<files-path name="project" path="project"/>
<root-path name="root_files" path="." />
<files-path name="sample" path="sample"/>
</paths>