chore: use private signing key to sign APKs

This commit is contained in:
Akash Yadav
2023-01-05 17:24:25 +05:30
parent 2c66d0e2bb
commit 9429f36f0d
24 changed files with 121 additions and 727 deletions
+7
View File
@@ -44,6 +44,13 @@ jobs:
${{ runner.os }}-gradle-
- name: Assemble Debug
run: ./gradlew assembleDebug
env:
IDE_SIGNING_ALIAS: ${{ secrets.IDE_SIGNING_ALIAS }}
IDE_SIGNING_AUTH_PASS: ${{ secrets.IDE_SIGNING_AUTH_PASS }}
IDE_SIGNING_AUTH_USER: ${{ secrets.IDE_SIGNING_AUTH_USER }}
IDE_SIGNING_KEY_PASS: ${{ secrets.IDE_SIGNING_KEY_PASS }}
IDE_SIGNING_STORE_PASS: ${{ secrets.IDE_SIGNING_STORE_PASS }}
IDE_SIGNING_URL: ${{ secrets.IDE_SIGNING_URL }}
- name: Upload APK
uses: actions/upload-artifact@v3
with:
+3
View File
@@ -1,3 +1,6 @@
# Downloaded signing key
signing-key.jks
# Built application files
*.apk
*.aar
+4
View File
@@ -1,3 +1,7 @@
# Directories that are created when generating signed APK in Android Studio
/debug
/release
# Built application files
*.apk
*.aar
+67 -12
View File
@@ -1,9 +1,14 @@
@file:Suppress("UnstableApiUsage")
import de.undercouch.gradle.tasks.download.DownloadAction
plugins {
id("com.android.application")
id("kotlin-android")
id("kotlin-kapt")
id("kotlin-parcelize")
id("com.google.android.gms.oss-licenses-plugin")
id("de.undercouch.download") version "5.3.0"
}
android {
@@ -16,20 +21,32 @@ android {
compileOptions { isCoreLibraryDesugaringEnabled = true }
signingConfigs.create("common") {
storeFile = file("dev.keystore")
keyAlias = "androidide"
storePassword = "ed68424fb109e5aa8146e4b86caa72e3"
keyPassword = "ed68424fb109e5aa8146e4b86caa72e3"
downloadSigningKey()
// Keystore credentials
val alias = checkAndGetEnv(KEY_ALIAS)
val storePass = checkAndGetEnv(KEY_STORE_PASS)
val keyPass = checkAndGetEnv(KEY_PASS)
if (alias != null && storePass != null && keyPass != null && signingKey.exists()) {
signingConfigs.create("common") {
storeFile = signingKey
keyAlias = alias
storePassword = storePass
keyPassword = keyPass
}
buildTypes {
debug { signingConfig = signingConfigs.getByName("common") }
release { signingConfig = signingConfigs.getByName("common") }
}
} else {
logger.warn(
"Signing info not configured. keystoreFile=$signingKey[exists=${signingKey.exists()}]"
)
}
buildTypes {
debug { signingConfig = signingConfigs.getByName("common") }
release {
isShrinkResources = true
signingConfig = signingConfigs.getByName("common")
}
}
buildTypes { release { isShrinkResources = true } }
packagingOptions {
resources.excludes.addAll(
@@ -135,3 +152,41 @@ dependencies {
androidTestImplementation(libs.tests.androidx.espresso)
androidTestImplementation(libs.tests.google.truth)
}
fun downloadSigningKey() {
if (signingKey.exists()) {
logger.info("Skipping download as ${signingKey.name} file already exists.")
return
}
// URL to download the signing key
val url = checkAndGetEnv(KEY_URL) ?: return
// Username and password required to download the keystore
val user = checkAndGetEnv(AUTH_USER) ?: return
val pass = checkAndGetEnv(AUTH_PASS) ?: return
logger.info("Downloading signing key...")
DownloadAction(project).apply {
src(url)
dest(signingKey)
username(user)
password(pass)
overwrite(false)
// Must be set to true
quiet(true)
}.execute()
// wait for the download to finish
.get()
}
fun checkAndGetEnv(env: String): String? {
val value = System.getenv(env)
if (value.isNullOrBlank()) {
logger.warn("$env is not set. Debug key will be used to sign the APK")
return null
}
return value
}
@@ -1 +0,0 @@
13:1.4.5:cc60397faac154890c9f2f4683bb70b6:82071990f993a249edb0412426c11d47
Binary file not shown.
@@ -1,33 +0,0 @@
package com.itsaky.androidide.preferences.databinding;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import com.google.android.material.textfield.TextInputLayout;
import com.itsaky.androidide.R;
import kotlin.io.CloseableKt;
/* loaded from: classes.dex */
public final class LayoutDialogTextInputBinding {
@NonNull
public final TextInputLayout name;
@NonNull
public final LinearLayout rootView;
public LayoutDialogTextInputBinding(@NonNull LinearLayout linearLayout, @NonNull TextInputLayout textInputLayout) {
this.rootView = linearLayout;
this.name = textInputLayout;
}
@NonNull
public static LayoutDialogTextInputBinding inflate(@NonNull LayoutInflater layoutInflater) {
View inflate = layoutInflater.inflate(R.layout.layout_dialog_text_input, (ViewGroup) null, false);
TextInputLayout textInputLayout = (TextInputLayout) CloseableKt.findChildViewById(inflate, R.id.name);
if (textInputLayout != null) {
return new LayoutDialogTextInputBinding((LinearLayout) inflate, textInputLayout);
}
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(R.id.name)));
}
}
@@ -1,6 +0,0 @@
package com.itsaky.androidide.preferences.internal;
/* compiled from: generalPreferences.kt */
/* loaded from: classes.dex */
public final class GeneralPreferencesKt {
}
@@ -1,224 +0,0 @@
package com.itsaky.androidide.xml.permissions;
import android.Manifest;
/* compiled from: Permission.kt */
/* loaded from: classes.dex */
public enum Permission {
ACCEPT_HANDOVER(Manifest.permission.ACCEPT_HANDOVER),
ACCESS_BACKGROUND_LOCATION(Manifest.permission.ACCESS_BACKGROUND_LOCATION),
ACCESS_BLOBS_ACROSS_USERS(Manifest.permission.ACCESS_BLOBS_ACROSS_USERS),
ACCESS_CHECKIN_PROPERTIES(Manifest.permission.ACCESS_CHECKIN_PROPERTIES),
ACCESS_COARSE_LOCATION(Manifest.permission.ACCESS_COARSE_LOCATION),
ACCESS_FINE_LOCATION(Manifest.permission.ACCESS_FINE_LOCATION),
ACCESS_LOCATION_EXTRA_COMMANDS(Manifest.permission.ACCESS_LOCATION_EXTRA_COMMANDS),
ACCESS_MEDIA_LOCATION(Manifest.permission.ACCESS_MEDIA_LOCATION),
ACCESS_NETWORK_STATE(Manifest.permission.ACCESS_NETWORK_STATE),
ACCESS_NOTIFICATION_POLICY(Manifest.permission.ACCESS_NOTIFICATION_POLICY),
ACCESS_WIFI_STATE(Manifest.permission.ACCESS_WIFI_STATE),
ACCOUNT_MANAGER(Manifest.permission.ACCOUNT_MANAGER),
ACTIVITY_RECOGNITION(Manifest.permission.ACTIVITY_RECOGNITION),
ADD_VOICEMAIL(Manifest.permission.ADD_VOICEMAIL),
ANSWER_PHONE_CALLS(Manifest.permission.ANSWER_PHONE_CALLS),
BATTERY_STATS(Manifest.permission.BATTERY_STATS),
BIND_ACCESSIBILITY_SERVICE(Manifest.permission.BIND_ACCESSIBILITY_SERVICE),
BIND_APPWIDGET(Manifest.permission.BIND_APPWIDGET),
BIND_AUTOFILL_SERVICE(Manifest.permission.BIND_AUTOFILL_SERVICE),
BIND_CALL_REDIRECTION_SERVICE(Manifest.permission.BIND_CALL_REDIRECTION_SERVICE),
BIND_CARRIER_MESSAGING_CLIENT_SERVICE(Manifest.permission.BIND_CARRIER_MESSAGING_CLIENT_SERVICE),
BIND_CARRIER_MESSAGING_SERVICE(Manifest.permission.BIND_CARRIER_MESSAGING_SERVICE),
BIND_CARRIER_SERVICES(Manifest.permission.BIND_CARRIER_SERVICES),
BIND_CHOOSER_TARGET_SERVICE("android.permission.BIND_CHOOSER_TARGET_SERVICE"),
BIND_COMPANION_DEVICE_SERVICE(Manifest.permission.BIND_COMPANION_DEVICE_SERVICE),
BIND_CONDITION_PROVIDER_SERVICE(Manifest.permission.BIND_CONDITION_PROVIDER_SERVICE),
BIND_CONTROLS(Manifest.permission.BIND_CONTROLS),
BIND_DEVICE_ADMIN(Manifest.permission.BIND_DEVICE_ADMIN),
BIND_DREAM_SERVICE(Manifest.permission.BIND_DREAM_SERVICE),
BIND_INCALL_SERVICE(Manifest.permission.BIND_INCALL_SERVICE),
BIND_INPUT_METHOD(Manifest.permission.BIND_INPUT_METHOD),
BIND_MIDI_DEVICE_SERVICE(Manifest.permission.BIND_MIDI_DEVICE_SERVICE),
BIND_NFC_SERVICE(Manifest.permission.BIND_NFC_SERVICE),
BIND_NOTIFICATION_LISTENER_SERVICE(Manifest.permission.BIND_NOTIFICATION_LISTENER_SERVICE),
BIND_PRINT_SERVICE(Manifest.permission.BIND_PRINT_SERVICE),
BIND_QUICK_ACCESS_WALLET_SERVICE(Manifest.permission.BIND_QUICK_ACCESS_WALLET_SERVICE),
BIND_QUICK_SETTINGS_TILE(Manifest.permission.BIND_QUICK_SETTINGS_TILE),
BIND_REMOTEVIEWS(Manifest.permission.BIND_REMOTEVIEWS),
BIND_SCREENING_SERVICE(Manifest.permission.BIND_SCREENING_SERVICE),
BIND_TELECOM_CONNECTION_SERVICE(Manifest.permission.BIND_TELECOM_CONNECTION_SERVICE),
BIND_TEXT_SERVICE(Manifest.permission.BIND_TEXT_SERVICE),
BIND_TV_INPUT(Manifest.permission.BIND_TV_INPUT),
BIND_TV_INTERACTIVE_APP(Manifest.permission.BIND_TV_INTERACTIVE_APP),
BIND_VISUAL_VOICEMAIL_SERVICE(Manifest.permission.BIND_VISUAL_VOICEMAIL_SERVICE),
BIND_VOICE_INTERACTION(Manifest.permission.BIND_VOICE_INTERACTION),
BIND_VPN_SERVICE(Manifest.permission.BIND_VPN_SERVICE),
BIND_VR_LISTENER_SERVICE(Manifest.permission.BIND_VR_LISTENER_SERVICE),
BIND_WALLPAPER(Manifest.permission.BIND_WALLPAPER),
BLUETOOTH(Manifest.permission.BLUETOOTH),
BLUETOOTH_ADMIN(Manifest.permission.BLUETOOTH_ADMIN),
BLUETOOTH_ADVERTISE(Manifest.permission.BLUETOOTH_ADVERTISE),
BLUETOOTH_CONNECT(Manifest.permission.BLUETOOTH_CONNECT),
BLUETOOTH_PRIVILEGED(Manifest.permission.BLUETOOTH_PRIVILEGED),
BLUETOOTH_SCAN(Manifest.permission.BLUETOOTH_SCAN),
BODY_SENSORS(Manifest.permission.BODY_SENSORS),
BODY_SENSORS_BACKGROUND(Manifest.permission.BODY_SENSORS_BACKGROUND),
BROADCAST_PACKAGE_REMOVED(Manifest.permission.BROADCAST_PACKAGE_REMOVED),
BROADCAST_SMS(Manifest.permission.BROADCAST_SMS),
BROADCAST_STICKY(Manifest.permission.BROADCAST_STICKY),
BROADCAST_WAP_PUSH(Manifest.permission.BROADCAST_WAP_PUSH),
CALL_COMPANION_APP(Manifest.permission.CALL_COMPANION_APP),
CALL_PHONE(Manifest.permission.CALL_PHONE),
CALL_PRIVILEGED(Manifest.permission.CALL_PRIVILEGED),
CAMERA(Manifest.permission.CAMERA),
CAPTURE_AUDIO_OUTPUT(Manifest.permission.CAPTURE_AUDIO_OUTPUT),
CHANGE_COMPONENT_ENABLED_STATE(Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE),
CHANGE_CONFIGURATION(Manifest.permission.CHANGE_CONFIGURATION),
CHANGE_NETWORK_STATE(Manifest.permission.CHANGE_NETWORK_STATE),
CHANGE_WIFI_MULTICAST_STATE(Manifest.permission.CHANGE_WIFI_MULTICAST_STATE),
CHANGE_WIFI_STATE(Manifest.permission.CHANGE_WIFI_STATE),
CLEAR_APP_CACHE(Manifest.permission.CLEAR_APP_CACHE),
CONTROL_LOCATION_UPDATES(Manifest.permission.CONTROL_LOCATION_UPDATES),
DELETE_CACHE_FILES(Manifest.permission.DELETE_CACHE_FILES),
DELETE_PACKAGES(Manifest.permission.DELETE_PACKAGES),
DELIVER_COMPANION_MESSAGES(Manifest.permission.DELIVER_COMPANION_MESSAGES),
DIAGNOSTIC(Manifest.permission.DIAGNOSTIC),
DISABLE_KEYGUARD(Manifest.permission.DISABLE_KEYGUARD),
DUMP(Manifest.permission.DUMP),
EXPAND_STATUS_BAR(Manifest.permission.EXPAND_STATUS_BAR),
FACTORY_TEST(Manifest.permission.FACTORY_TEST),
FOREGROUND_SERVICE(Manifest.permission.FOREGROUND_SERVICE),
GET_ACCOUNTS(Manifest.permission.GET_ACCOUNTS),
GET_ACCOUNTS_PRIVILEGED(Manifest.permission.GET_ACCOUNTS_PRIVILEGED),
GET_PACKAGE_SIZE(Manifest.permission.GET_PACKAGE_SIZE),
GET_TASKS(Manifest.permission.GET_TASKS),
GLOBAL_SEARCH(Manifest.permission.GLOBAL_SEARCH),
HIDE_OVERLAY_WINDOWS(Manifest.permission.HIDE_OVERLAY_WINDOWS),
HIGH_SAMPLING_RATE_SENSORS(Manifest.permission.HIGH_SAMPLING_RATE_SENSORS),
INSTALL_LOCATION_PROVIDER(Manifest.permission.INSTALL_LOCATION_PROVIDER),
INSTALL_PACKAGES(Manifest.permission.INSTALL_PACKAGES),
INSTALL_SHORTCUT(Manifest.permission.INSTALL_SHORTCUT),
INSTANT_APP_FOREGROUND_SERVICE(Manifest.permission.INSTANT_APP_FOREGROUND_SERVICE),
INTERACT_ACROSS_PROFILES(Manifest.permission.INTERACT_ACROSS_PROFILES),
INTERNET(Manifest.permission.INTERNET),
KILL_BACKGROUND_PROCESSES(Manifest.permission.KILL_BACKGROUND_PROCESSES),
LAUNCH_MULTI_PANE_SETTINGS_DEEP_LINK(Manifest.permission.LAUNCH_MULTI_PANE_SETTINGS_DEEP_LINK),
LOADER_USAGE_STATS(Manifest.permission.LOADER_USAGE_STATS),
LOCATION_HARDWARE(Manifest.permission.LOCATION_HARDWARE),
MANAGE_DOCUMENTS(Manifest.permission.MANAGE_DOCUMENTS),
MANAGE_EXTERNAL_STORAGE(Manifest.permission.MANAGE_EXTERNAL_STORAGE),
MANAGE_MEDIA(Manifest.permission.MANAGE_MEDIA),
MANAGE_ONGOING_CALLS(Manifest.permission.MANAGE_ONGOING_CALLS),
MANAGE_OWN_CALLS(Manifest.permission.MANAGE_OWN_CALLS),
MANAGE_WIFI_INTERFACES(Manifest.permission.MANAGE_WIFI_INTERFACES),
MANAGE_WIFI_NETWORK_SELECTION(Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION),
MASTER_CLEAR(Manifest.permission.MASTER_CLEAR),
MEDIA_CONTENT_CONTROL(Manifest.permission.MEDIA_CONTENT_CONTROL),
MODIFY_AUDIO_SETTINGS(Manifest.permission.MODIFY_AUDIO_SETTINGS),
MODIFY_PHONE_STATE(Manifest.permission.MODIFY_PHONE_STATE),
MOUNT_FORMAT_FILESYSTEMS(Manifest.permission.MOUNT_FORMAT_FILESYSTEMS),
MOUNT_UNMOUNT_FILESYSTEMS(Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS),
NEARBY_WIFI_DEVICES(Manifest.permission.NEARBY_WIFI_DEVICES),
NFC(Manifest.permission.NFC),
NFC_PREFERRED_PAYMENT_INFO(Manifest.permission.NFC_PREFERRED_PAYMENT_INFO),
NFC_TRANSACTION_EVENT(Manifest.permission.NFC_TRANSACTION_EVENT),
OVERRIDE_WIFI_CONFIG(Manifest.permission.OVERRIDE_WIFI_CONFIG),
PACKAGE_USAGE_STATS(Manifest.permission.PACKAGE_USAGE_STATS),
PERSISTENT_ACTIVITY(Manifest.permission.PERSISTENT_ACTIVITY),
POST_NOTIFICATIONS(Manifest.permission.POST_NOTIFICATIONS),
PROCESS_OUTGOING_CALLS(Manifest.permission.PROCESS_OUTGOING_CALLS),
QUERY_ALL_PACKAGES(Manifest.permission.QUERY_ALL_PACKAGES),
READ_ASSISTANT_APP_SEARCH_DATA(Manifest.permission.READ_ASSISTANT_APP_SEARCH_DATA),
READ_BASIC_PHONE_STATE(Manifest.permission.READ_BASIC_PHONE_STATE),
READ_CALENDAR(Manifest.permission.READ_CALENDAR),
READ_CALL_LOG(Manifest.permission.READ_CALL_LOG),
READ_CONTACTS(Manifest.permission.READ_CONTACTS),
READ_EXTERNAL_STORAGE(Manifest.permission.READ_EXTERNAL_STORAGE),
READ_HOME_APP_SEARCH_DATA(Manifest.permission.READ_HOME_APP_SEARCH_DATA),
READ_INPUT_STATE(Manifest.permission.READ_INPUT_STATE),
READ_LOGS(Manifest.permission.READ_LOGS),
READ_MEDIA_AUDIO(Manifest.permission.READ_MEDIA_AUDIO),
READ_MEDIA_IMAGES(Manifest.permission.READ_MEDIA_IMAGES),
READ_MEDIA_VIDEO(Manifest.permission.READ_MEDIA_VIDEO),
READ_NEARBY_STREAMING_POLICY(Manifest.permission.READ_NEARBY_STREAMING_POLICY),
READ_PHONE_NUMBERS(Manifest.permission.READ_PHONE_NUMBERS),
READ_PHONE_STATE(Manifest.permission.READ_PHONE_STATE),
READ_PRECISE_PHONE_STATE(Manifest.permission.READ_PRECISE_PHONE_STATE),
READ_SMS(Manifest.permission.READ_SMS),
READ_SYNC_SETTINGS(Manifest.permission.READ_SYNC_SETTINGS),
READ_SYNC_STATS(Manifest.permission.READ_SYNC_STATS),
READ_VOICEMAIL(Manifest.permission.READ_VOICEMAIL),
REBOOT(Manifest.permission.REBOOT),
RECEIVE_BOOT_COMPLETED(Manifest.permission.RECEIVE_BOOT_COMPLETED),
RECEIVE_MMS(Manifest.permission.RECEIVE_MMS),
RECEIVE_SMS(Manifest.permission.RECEIVE_SMS),
RECEIVE_WAP_PUSH(Manifest.permission.RECEIVE_WAP_PUSH),
RECORD_AUDIO(Manifest.permission.RECORD_AUDIO),
REORDER_TASKS(Manifest.permission.REORDER_TASKS),
REQUEST_COMPANION_PROFILE_APP_STREAMING(Manifest.permission.REQUEST_COMPANION_PROFILE_APP_STREAMING),
REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION(Manifest.permission.REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION),
REQUEST_COMPANION_PROFILE_COMPUTER(Manifest.permission.REQUEST_COMPANION_PROFILE_COMPUTER),
REQUEST_COMPANION_PROFILE_WATCH(Manifest.permission.REQUEST_COMPANION_PROFILE_WATCH),
REQUEST_COMPANION_RUN_IN_BACKGROUND(Manifest.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND),
REQUEST_COMPANION_SELF_MANAGED(Manifest.permission.REQUEST_COMPANION_SELF_MANAGED),
REQUEST_COMPANION_START_FOREGROUND_SERVICES_FROM_BACKGROUND(Manifest.permission.REQUEST_COMPANION_START_FOREGROUND_SERVICES_FROM_BACKGROUND),
REQUEST_COMPANION_USE_DATA_IN_BACKGROUND(Manifest.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND),
REQUEST_DELETE_PACKAGES(Manifest.permission.REQUEST_DELETE_PACKAGES),
REQUEST_IGNORE_BATTERY_OPTIMIZATIONS(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS),
REQUEST_INSTALL_PACKAGES(Manifest.permission.REQUEST_INSTALL_PACKAGES),
REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE(Manifest.permission.REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE),
REQUEST_PASSWORD_COMPLEXITY(Manifest.permission.REQUEST_PASSWORD_COMPLEXITY),
RESTART_PACKAGES(Manifest.permission.RESTART_PACKAGES),
SCHEDULE_EXACT_ALARM(Manifest.permission.SCHEDULE_EXACT_ALARM),
SEND_RESPOND_VIA_MESSAGE(Manifest.permission.SEND_RESPOND_VIA_MESSAGE),
SEND_SMS(Manifest.permission.SEND_SMS),
SET_ALARM(Manifest.permission.SET_ALARM),
SET_ALWAYS_FINISH(Manifest.permission.SET_ALWAYS_FINISH),
SET_ANIMATION_SCALE(Manifest.permission.SET_ANIMATION_SCALE),
SET_DEBUG_APP(Manifest.permission.SET_DEBUG_APP),
SET_PREFERRED_APPLICATIONS(Manifest.permission.SET_PREFERRED_APPLICATIONS),
SET_PROCESS_LIMIT(Manifest.permission.SET_PROCESS_LIMIT),
SET_TIME(Manifest.permission.SET_TIME),
SET_TIME_ZONE(Manifest.permission.SET_TIME_ZONE),
SET_WALLPAPER(Manifest.permission.SET_WALLPAPER),
SET_WALLPAPER_HINTS(Manifest.permission.SET_WALLPAPER_HINTS),
SIGNAL_PERSISTENT_PROCESSES(Manifest.permission.SIGNAL_PERSISTENT_PROCESSES),
SMS_FINANCIAL_TRANSACTIONS(Manifest.permission.SMS_FINANCIAL_TRANSACTIONS),
START_FOREGROUND_SERVICES_FROM_BACKGROUND(Manifest.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND),
START_VIEW_APP_FEATURES(Manifest.permission.START_VIEW_APP_FEATURES),
START_VIEW_PERMISSION_USAGE(Manifest.permission.START_VIEW_PERMISSION_USAGE),
STATUS_BAR(Manifest.permission.STATUS_BAR),
SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE(Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE),
SYSTEM_ALERT_WINDOW(Manifest.permission.SYSTEM_ALERT_WINDOW),
TRANSMIT_IR(Manifest.permission.TRANSMIT_IR),
UNINSTALL_SHORTCUT(Manifest.permission.UNINSTALL_SHORTCUT),
UPDATE_DEVICE_STATS(Manifest.permission.UPDATE_DEVICE_STATS),
UPDATE_PACKAGES_WITHOUT_USER_ACTION(Manifest.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION),
USE_BIOMETRIC(Manifest.permission.USE_BIOMETRIC),
USE_EXACT_ALARM(Manifest.permission.USE_EXACT_ALARM),
USE_FINGERPRINT(Manifest.permission.USE_FINGERPRINT),
USE_FULL_SCREEN_INTENT(Manifest.permission.USE_FULL_SCREEN_INTENT),
USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER(Manifest.permission.USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER),
USE_SIP(Manifest.permission.USE_SIP),
UWB_RANGING(Manifest.permission.UWB_RANGING),
VIBRATE(Manifest.permission.VIBRATE),
WAKE_LOCK(Manifest.permission.WAKE_LOCK),
WRITE_APN_SETTINGS(Manifest.permission.WRITE_APN_SETTINGS),
WRITE_CALENDAR(Manifest.permission.WRITE_CALENDAR),
WRITE_CALL_LOG(Manifest.permission.WRITE_CALL_LOG),
WRITE_CONTACTS(Manifest.permission.WRITE_CONTACTS),
WRITE_EXTERNAL_STORAGE(Manifest.permission.WRITE_EXTERNAL_STORAGE),
WRITE_GSERVICES(Manifest.permission.WRITE_GSERVICES),
WRITE_SECURE_SETTINGS(Manifest.permission.WRITE_SECURE_SETTINGS),
WRITE_SETTINGS(Manifest.permission.WRITE_SETTINGS),
WRITE_SYNC_SETTINGS(Manifest.permission.WRITE_SYNC_SETTINGS),
WRITE_VOICEMAIL(Manifest.permission.WRITE_VOICEMAIL);
private final String constant;
Permission(String str) {
this.constant = str;
}
public final String getConstant() {
return this.constant;
}
}
@@ -1,14 +0,0 @@
package com.itsaky.androidide.xml.utils;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.SynchronizedLazyImpl;
import kotlin.jvm.functions.Function0;
/* compiled from: patterns.kt */
/* loaded from: classes.dex */
public final class PatternsKt {
public static final SynchronizedLazyImpl attrValue_unqualifiedRef$delegate = LazyKt__LazyJVMKt.lazy((Function0) PatternsKt$attrValue_unqualifiedRef$2.INSTANCE);
public static final SynchronizedLazyImpl attrValue_qualifiedRef$delegate = LazyKt__LazyJVMKt.lazy((Function0) PatternsKt$attrValue_qualifiedRef$2.INSTANCE);
public static final SynchronizedLazyImpl attrValue_qualifiedRefWithIncompleteType$delegate = LazyKt__LazyJVMKt.lazy((Function0) PatternsKt$attrValue_qualifiedRefWithIncompleteType$2.INSTANCE);
public static final SynchronizedLazyImpl attrValue_qualifiedRefWithIncompletePckOrType$delegate = LazyKt__LazyJVMKt.lazy((Function0) PatternsKt$attrValue_qualifiedRefWithIncompletePckOrType$2.INSTANCE);
}
@@ -1,174 +0,0 @@
package com.itsaky.androidide.preferences;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.core.R$id;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.FunctionReferenceImpl;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.MutablePropertyReference0Impl;
import kotlin.reflect.KMutableProperty0;
import org.eclipse.jgit.merge.MergeMessageFormatter;
/* compiled from: editor.kt */
/* loaded from: classes.dex */
public final class CompletionsMatchLower extends SwitchPreference {
public static final Parcelable.Creator<CompletionsMatchLower> CREATOR = new Creator();
public final Integer icon;
public final String key;
public final Integer summary;
public final int title;
/* compiled from: editor.kt */
/* renamed from: com.itsaky.androidide.preferences.CompletionsMatchLower$1 reason: invalid class name */
/* loaded from: classes.dex */
public /* synthetic */ class AnonymousClass1 extends FunctionReferenceImpl implements Function1<Boolean, Unit> {
public AnonymousClass1(AnonymousClass2 anonymousClass2) {
super(1, anonymousClass2, KMutableProperty0.class, "set", "set(Ljava/lang/Object;)V", 0);
}
@Override // kotlin.jvm.functions.Function1
public final Unit invoke(Boolean bool) {
((KMutableProperty0) this.receiver).set(Boolean.valueOf(bool.booleanValue()));
return Unit.INSTANCE;
}
}
/* compiled from: editor.kt */
/* renamed from: com.itsaky.androidide.preferences.CompletionsMatchLower$2 reason: invalid class name */
/* loaded from: classes.dex */
public /* synthetic */ class AnonymousClass2 extends MutablePropertyReference0Impl {
public static final AnonymousClass2 INSTANCE = new AnonymousClass2();
public AnonymousClass2() {
super(MergeMessageFormatter.class, "completionsMatchLower", "getCompletionsMatchLower()Z");
}
public final Object get$1() {
return AutoSave$2$$ExternalSyntheticOutline0.m("idepref_editor_completions_matchLower", false);
}
@Override // kotlin.jvm.internal.MutablePropertyReference0Impl, kotlin.reflect.KMutableProperty0
public final void set(Object obj) {
R$id.getPrefManager().putBoolean("idepref_editor_completions_matchLower", ((Boolean) obj).booleanValue());
}
}
/* compiled from: editor.kt */
/* renamed from: com.itsaky.androidide.preferences.CompletionsMatchLower$3 reason: invalid class name */
/* loaded from: classes.dex */
public /* synthetic */ class AnonymousClass3 extends FunctionReferenceImpl implements Function0<Boolean> {
public AnonymousClass3(AnonymousClass4 anonymousClass4) {
super(0, anonymousClass4, KMutableProperty0.class, "get", "get()Ljava/lang/Object;", 0);
}
@Override // kotlin.jvm.functions.Function0
public final Boolean invoke() {
return (Boolean) ((KMutableProperty0) this.receiver).get$1();
}
}
/* compiled from: editor.kt */
/* renamed from: com.itsaky.androidide.preferences.CompletionsMatchLower$4 reason: invalid class name */
/* loaded from: classes.dex */
public /* synthetic */ class AnonymousClass4 extends MutablePropertyReference0Impl {
public static final AnonymousClass4 INSTANCE = new AnonymousClass4();
public AnonymousClass4() {
super(MergeMessageFormatter.class, "completionsMatchLower", "getCompletionsMatchLower()Z");
}
public final Object get$1() {
return AutoSave$2$$ExternalSyntheticOutline0.m("idepref_editor_completions_matchLower", false);
}
@Override // kotlin.jvm.internal.MutablePropertyReference0Impl, kotlin.reflect.KMutableProperty0
public final void set(Object obj) {
R$id.getPrefManager().putBoolean("idepref_editor_completions_matchLower", ((Boolean) obj).booleanValue());
}
}
/* compiled from: editor.kt */
/* loaded from: classes.dex */
public static final class Creator implements Parcelable.Creator<CompletionsMatchLower> {
@Override // android.os.Parcelable.Creator
public final CompletionsMatchLower createFromParcel(Parcel parcel) {
Integer valueOf;
Intrinsics.checkNotNullParameter(parcel, "parcel");
String readString = parcel.readString();
int readInt = parcel.readInt();
Integer num = null;
if (parcel.readInt() == 0) {
valueOf = null;
} else {
valueOf = Integer.valueOf(parcel.readInt());
}
if (parcel.readInt() != 0) {
num = Integer.valueOf(parcel.readInt());
}
return new CompletionsMatchLower(readString, readInt, valueOf, num);
}
@Override // android.os.Parcelable.Creator
public final CompletionsMatchLower[] newArray(int i) {
return new CompletionsMatchLower[i];
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public CompletionsMatchLower(String key, int i, Integer num, Integer num2) {
super(new AnonymousClass3(AnonymousClass4.INSTANCE), new AnonymousClass1(AnonymousClass2.INSTANCE));
Intrinsics.checkNotNullParameter(key, "key");
this.key = key;
this.title = i;
this.summary = num;
this.icon = num2;
}
@Override // android.os.Parcelable
public final int describeContents() {
return 0;
}
@Override // com.itsaky.androidide.preferences.IPreference
public final Integer getIcon() {
return this.icon;
}
@Override // com.itsaky.androidide.preferences.IPreference
public final String getKey() {
return this.key;
}
@Override // com.itsaky.androidide.preferences.IPreference
public final Integer getSummary() {
return this.summary;
}
@Override // com.itsaky.androidide.preferences.IPreference
public final int getTitle() {
return this.title;
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel out, int i) {
Intrinsics.checkNotNullParameter(out, "out");
out.writeString(this.key);
out.writeInt(this.title);
int i2 = 0;
Integer num = this.summary;
if (num == null) {
out.writeInt(0);
} else {
AutoSave$$ExternalSyntheticOutline0.m(out, 1, num);
}
Integer num2 = this.icon;
if (num2 != null) {
out.writeInt(1);
i2 = num2.intValue();
}
out.writeInt(i2);
}
}
@@ -1,45 +0,0 @@
package com.itsaky.androidide.xml.widgets.internal.util;
import com.itsaky.androidide.xml.widgets.Widget;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Intrinsics$$ExternalSyntheticCheckNotZero0;
/* compiled from: DefaultWidget.kt */
/* loaded from: classes.dex */
public final class DefaultWidget implements Widget {
public final String qualifiedName;
public final String simpleName;
public final List<String> superclasses;
public final int type;
/* JADX WARN: Incorrect types in method signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List<Ljava/lang/String;>;)V */
public DefaultWidget(String str, String str2, int i, List superclasses) {
Intrinsics$$ExternalSyntheticCheckNotZero0.m(i, "type");
Intrinsics.checkNotNullParameter(superclasses, "superclasses");
this.simpleName = str;
this.qualifiedName = str2;
this.type = i;
this.superclasses = superclasses;
}
@Override // com.itsaky.androidide.xml.widgets.Widget
public final String getQualifiedName() {
return this.qualifiedName;
}
@Override // com.itsaky.androidide.xml.widgets.Widget
public final String getSimpleName() {
return this.simpleName;
}
@Override // com.itsaky.androidide.xml.widgets.Widget
public final List<String> getSuperclasses() {
return this.superclasses;
}
@Override // com.itsaky.androidide.xml.widgets.Widget
public final int getType$enumunboxing$() {
return this.type;
}
}
@@ -1,210 +0,0 @@
package com.itsaky.androidide.treesitter;
import com.google.protobuf.ByteString$BoundedByteString$$ExternalSyntheticOutline0;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/* loaded from: classes.dex */
public class TSNode {
private int context0;
private int context1;
private int context2;
private int context3;
private long id;
private TSTree mTree;
private long tree;
private TSNode() {
}
private native TSNode getChildAt(int i);
private native TSNode getChildByFieldName(byte[] bArr, int i);
private native TSNode getNamedChildAt(int i);
public List<TSNode> findChildrenWithType(String str, boolean z, boolean z2) {
int childCount;
TSNode child;
if (z) {
return findChildrenWithTypeReverse(str, z2);
}
ArrayList arrayList = new ArrayList();
int i = 0;
while (true) {
if (z2) {
childCount = getNamedChildCount();
} else {
childCount = getChildCount();
}
if (i < childCount) {
if (z2) {
child = getNamedChild(i);
} else {
child = getChild(i);
}
if (!child.isNull() && Objects.equals(str, child.getType())) {
arrayList.add(child);
}
i++;
} else {
return arrayList;
}
}
}
public List<TSNode> findChildrenWithTypeReverse(String str, boolean z) {
int childCount;
TSNode child;
ArrayList arrayList = new ArrayList();
if (z) {
childCount = getNamedChildCount();
} else {
childCount = getChildCount();
}
for (int i = childCount - 1; i > 0; i--) {
if (z) {
child = getNamedChild(i);
} else {
child = getChild(i);
}
if (!child.isNull() && Objects.equals(str, child.getType())) {
arrayList.add(child);
}
}
return arrayList;
}
public TSNode findNodeWithType(String str, boolean z) {
int childCount;
TSNode child;
int i = 0;
while (true) {
if (z) {
childCount = getNamedChildCount();
} else {
childCount = getChildCount();
}
if (i < childCount) {
if (z) {
child = getNamedChild(i);
} else {
child = getChild(i);
}
if (!child.isNull() && str.equals(child.getType())) {
return child;
}
i++;
} else {
return null;
}
}
}
public TSNode getChild(int i) {
int childCount = getChildCount();
if (i >= 0 && i < childCount) {
return getChildAt(i);
}
throw new IndexOutOfBoundsException(ByteString$BoundedByteString$$ExternalSyntheticOutline0.m("count=", childCount, ", index=", i));
}
public native TSNode getChildByFieldId(int i);
public TSNode getChildByFieldName(String str) {
byte[] bytes = str.getBytes(StandardCharsets.UTF_8);
return getChildByFieldName(bytes, bytes.length);
}
public native int getChildCount();
public native TSNode getDescendantForByteRange(int i, int i2);
public native TSNode getDescendantForPointRange(TSPoint tSPoint, TSPoint tSPoint2);
public native int getEndByte();
public native TSPoint getEndPoint();
public native String getFieldNameForChild(int i);
public native TSNode getFirstChildForByte(int i);
public native TSNode getFirstNamedChildForByte(int i);
public TSNode getNamedChild(int i) {
int namedChildCount = getNamedChildCount();
if (i >= 0 && i < namedChildCount) {
return getNamedChildAt(i);
}
throw new IndexOutOfBoundsException(ByteString$BoundedByteString$$ExternalSyntheticOutline0.m("count=", namedChildCount, ", index=", i));
}
public native int getNamedChildCount();
public native TSNode getNamedDescendantForByteRange(int i, int i2);
public native TSNode getNamedDescendantForPointRange(TSPoint tSPoint, TSPoint tSPoint2);
public native TSNode getNextNamedSibling();
public native TSNode getNextSibling();
public native String getNodeString();
public native TSNode getParent();
public native TSNode getPreviousNamedSibling();
public native TSNode getPreviousSibling();
public native int getStartByte();
public native TSPoint getStartPoint();
public native int getSymbol();
public TSTree getTree() {
if (this.mTree == null) {
this.mTree = new TSTree(this.tree);
}
return this.mTree;
}
public native String getType();
public native boolean hasChanges();
public native boolean hasErrors();
public native boolean isEqualTo(TSNode tSNode);
public native boolean isExtra();
public native boolean isMissing();
public native boolean isNamed();
public native boolean isNull();
public String toString() {
String type;
StringBuilder sb = new StringBuilder("TSNode{id=");
sb.append(this.id);
sb.append(", type=");
if (isNull()) {
type = "<null>";
} else {
type = getType();
}
sb.append(type);
sb.append('}');
return sb.toString();
}
public TSTreeCursor walk() {
return new TSTreeCursor(this);
}
}
+2 -2
View File
@@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 213,
"versionName": "2.1.3-beta",
"versionCode": 214,
"versionName": "2.1.4-beta",
"outputFile": "app-release.apk"
}
],
Binary file not shown.
+29
View File
@@ -0,0 +1,29 @@
/*
* This file is part of AndroidIDE.
*
* AndroidIDE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* AndroidIDE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
*/
import org.gradle.api.Project
import java.io.File
val KEY_ALIAS = "IDE_SIGNING_ALIAS"
val AUTH_PASS = "IDE_SIGNING_AUTH_PASS"
val AUTH_USER = "IDE_SIGNING_AUTH_USER"
val KEY_PASS = "IDE_SIGNING_KEY_PASS"
val KEY_STORE_PASS = "IDE_SIGNING_STORE_PASS"
val KEY_URL = "IDE_SIGNING_URL"
val Project.signingKey: File
get() = rootProject.file("signing-key.jks")
+9 -6
View File
@@ -1,12 +1,12 @@
# **AndroidIDE v2.1.4-beta**
This release improves the UI Designer, adds support for custom custom color schemes in editor, uses tree sitter for syntax highlighting and much more.
This release improves the UI Designer, adds support for custom custom color schemes in editor and much more.
## Important notes
- Enjoy an experience closer to your device with Dynamic colors support in AndroidIDE. This is enabled by default but can be disabled in IDE preferences.
- The IDE now has a light theme. The light/dark theme is automatically used based on your system theme. However, you can switch to other theme in IDE preferences.
- The IDE now supports custom color schemes for Java and XML languages. The color schemes can be customized by editing the files in `$HOME/.androidide/editor/schemes` folder.
- The UI designer has been rewritten from scratch. It now has better support to resource resolution, support for more views, undo/redo support, etc.
- The IDE now has a light theme. The light/dark themes are automatically switched based on your system theme. However, you can switch to other theme in IDE preferences.
- Support for custom editor color schemes has been added (only for Java and XML languages at the moment). The color schemes can be customized by editing the files in `$HOME/.androidide/editor/schemes` folder.
- The UI designer has been rewritten from scratch. It now has support for more views, undo/redo, better resource resolution, etc.
## Additions
- Light IDE theme.
@@ -14,6 +14,7 @@ This release improves the UI Designer, adds support for custom custom color sche
- Support for custom color schemes.
- Empty project template without AndroidX libraries. Thanks to @Rystars (#620).
- Option to clone Git repository. Thanks to @Deenu143 (#632).
- The IDE now remembers the opened files and reopens them automatically when the project is reopened.
## Fixes
@@ -22,10 +23,12 @@ The following issues has been fixed :
- Activity is restarted when it is not focused during installation process (#628).
- NPE when appending log lines (#605).
- Editor is overlapped by SymbolInputView (#589).
- Crash in when clicking the `Preview layout` action and a non-XML file is opened (#666).
- Crash on clicking the `Preview layout` action if a non-XML file is opened (#666).
- R.jar completions are not updated after resource updates.
## Improvements
- Replaced file tab actions' `quick action menu` with `PopupMenu`.
- Improved UI designer. Thanks to @deepkrg17 for view adapter implementations (#673, #680).
- Better handling of device configuration changes.
- Replaced file tab actions with `PopupMenu`.
- Improved transitions for bottom bar in editor activity.
- Updated translations. Thanks to all Crowdin contributors.