Skip to content

Commit

Permalink
♻️ Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
yhs0602 committed Oct 2, 2023
1 parent e223e7d commit 33234d1
Show file tree
Hide file tree
Showing 19 changed files with 143 additions and 84 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ captures/
*.hprof
app/release/
app/src/main/asm/
google-services.json
66 changes: 31 additions & 35 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ apply plugin: 'com.google.firebase.crashlytics'


android {
compileSdkVersion 31
defaultConfig {
compileSdk 34
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand All @@ -18,7 +20,7 @@ android {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
composeOptions {
kotlinCompilerExtensionVersion '1.1.0-rc02'
kotlinCompilerExtensionVersion "1.4.3"
}
defaultConfig {
applicationId "com.kyhsgeekcode.disassembler"
Expand Down Expand Up @@ -89,33 +91,47 @@ android {
}

ndkVersion "23.1.7779620"
namespace 'com.kyhsgeekcode.disassembler'
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.google.android.gms:play-services-ads:20.5.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.gms:play-services-ads:22.4.0'
implementation 'com.github.codekidX:storage-chooser:2.0.4.4'
implementation 'com.github.skydoves:colorpickerview:2.2.4'
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
implementation(platform("androidx.compose:compose-bom:2023.03.00"))
implementation("androidx.activity:activity-compose:1.7.2")
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")

implementation("androidx.paging:paging-common-ktx:3.2.1")
// implementation group: "pl.openrnd.android", name: "multi-level-listview", version: "1.0.1"
// https://mvnrepository.com/artifact/commons-io/commons-io
// implementation group: 'commons-io', name: 'commons-io', version: '2.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.android.support.constraint:constraint-layout:2.0.4'

//implementation 'dotnet.msil.decompiler:+'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.core:core-ktx:1.7.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation('com.louiscad.splitties:splitties-fun-pack-android-base:3.0.0')
implementation "com.louiscad.splitties:splitties-systemservices:$splitties_version"
implementation("com.louiscad.splitties:splitties-appctx:$splitties_version")
implementation 'org.apache.commons:commons-compress:1.21'
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
// implementation("com.google.guava:guava:29.0-android")
implementation("com.google.guava:guava:31.1-android")
implementation('org.smali:baksmali:2.5.2')
implementation 'com.beust:jcommander:1.82'
implementation 'org.smali:util:2.5.2'


implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0'
implementation 'org.jsoup:jsoup:1.14.3'

implementation 'com.jakewharton.timber:timber:5.0.1'
Expand All @@ -125,18 +141,16 @@ dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2'

implementation "androidx.multidex:multidex:2.0.1"
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta02'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0'



implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation "com.mikepenz:aboutlibraries:8.9.4"
implementation "androidx.cardview:cardview:1.0.0"

implementation platform('com.google.firebase:firebase-bom:29.0.3')
implementation platform('com.google.firebase:firebase-bom:30.1.0')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-crashlytics-ktx'

Expand All @@ -156,32 +170,14 @@ dependencies {
testImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

implementation 'androidx.fragment:fragment-ktx:1.4.0'
implementation 'androidx.activity:activity-ktx:1.4.0'
implementation 'androidx.fragment:fragment-ktx:1.6.1'
implementation 'androidx.activity:activity-ktx:1.7.2'

// Integration with activities
implementation 'androidx.activity:activity-compose:1.4.0'
// Compose Material Design
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.material:material-icons-extended:$compose_version"

// Animations
implementation "androidx.compose.animation:animation:$compose_version"
// Tooling support (Previews, etc.)
implementation "androidx.compose.ui:ui-tooling:$compose_version"

// Integration with ViewModels
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0'
implementation 'androidx.navigation:navigation-compose:2.4.0-rc01'

implementation "com.google.accompanist:accompanist-permissions:0.22.0-rc"
implementation "com.google.accompanist:accompanist-permissions:0.30.1"

// When using a AppCompat theme
implementation "com.google.accompanist:accompanist-appcompat-theme:0.20.3"

// UI Tests
androidTestImplementation 'androidx.compose.ui:ui-test-junit4:1.0.5'

// implementation 'com.gu.android:toolargetool:0.3.0@aar'
}
/*
Expand Down
47 changes: 47 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"project_info": {
"project_number": "883983907421",
"project_id": "android-disassembler",
"storage_bucket": "android-disassembler.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:883983907421:android:5b020ea180e0aebea56bb4",
"android_client_info": {
"package_name": "com.kyhsgeekcode.disassembler"
}
},
"oauth_client": [
{
"client_id": "883983907421-bql61u4elqqin8agng1d627i0kcqas65.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.kyhsgeekcode.disassembler",
"certificate_hash": "338bf66bcd364c3166ad4792068c1bd0cb75e3c7"
}
},
{
"client_id": "883983907421-9vh06ekki19gm703g90hcvusipio8u3a.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCMDfgCQWnGziwRim_j5LB5xn_Bh1VDlZ8"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "883983907421-9vh06ekki19gm703g90hcvusipio8u3a.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
Binary file removed app/libs/baksmali-2.3.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.kyhsgeekcode.disassembler">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class FileDrawerListAdapter(val progressHandler: ProgressHandler) {
ProjectDataStorage.resolveToWrite(ProjectManager.getRelPath(filename), true)
// val targetDirectory = File(File(appCtx.filesDir, "/dex-decompiled/"), File(filename).name + "/")
targetDirectory.mkdirs()
// run backsmali
Main.main(arrayOf("d", "-o", targetDirectory.absolutePath, filename))
progressHandler.finishProgress()
return getSubObjects(FileDrawerListItem(targetDirectory, initialLevel))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.*
import androidx.compose.material.Button
import androidx.compose.material.Text
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.*
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -122,7 +122,7 @@ class MainActivity : AppCompatActivity() {
// the permission for the first time, explain why the feature is needed by the app and allow
// the user to be presented with the permission again or to not see the rationale any more.
storagePermissionState.shouldShowRationale ||
!storagePermissionState.permissionRequested -> {
!storagePermissionState.allPermissionsGranted -> {
if (doNotShowRationale) {
Text("Feature not available")
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.IntrinsicSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.material.DropdownMenu
import androidx.compose.material.DropdownMenuItem
import androidx.compose.material.OutlinedTextField
import androidx.compose.material.Text
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.window.PopupProperties

// https://stackoverflow.com/a/67116200/8614565
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun AutoCompleteTextField(
value: String,
Expand All @@ -38,11 +40,13 @@ fun AutoCompleteTextField(
properties = PopupProperties(focusable = false)
) {
suggestions.forEach { label ->
DropdownMenuItem(onClick = {
onOptionSelected(label)
}) {
Text(text = label)
}
DropdownMenuItem(
text = {
Text(text = label)
},
onClick = {
onOptionSelected(label)
})
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.material.AlertDialog
import androidx.compose.material.Button
import androidx.compose.material.Checkbox
import androidx.compose.material.Text
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.Checkbox
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.snapshots.SnapshotStateList
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -42,7 +42,7 @@ fun MultiCheckBoxDialog(
}
}
},
buttons = {
confirmButton = {
Row(
modifier = Modifier.padding(all = 8.dp),
horizontalArrangement = Arrangement.Center
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package com.kyhsgeekcode.disassembler.ui.components

import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
import androidx.compose.material.AlertDialog
import androidx.compose.material.Text
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier

Expand All @@ -30,6 +30,7 @@ fun SelectOneActionDialog(
}
}
},
buttons = {}
confirmButton = {
}
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.material.AlertDialog
import androidx.compose.material.Button
import androidx.compose.material.Text
import androidx.compose.material.TextField
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Text
import androidx.compose.material3.TextField
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun TextInputDialog(
title: String,
Expand All @@ -32,7 +34,7 @@ fun TextInputDialog(
TextField(value = text, onValueChange = onTextChanged)
}
},
buttons = {
confirmButton = {
Row(
modifier = Modifier.padding(all = 8.dp),
horizontalArrangement = Arrangement.Center
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.LinearProgressIndicator
import androidx.compose.material.Text
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -71,6 +71,7 @@ fun AnalysisTab(data: TabData, viewModel: MainViewModel) {
is AnalysisState.Ready -> {

}

is AnalysisState.Running -> {
LinearProgressIndicator(progress = s.progress.toFloat() / s.total)
Text(s.stage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.Text
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.material.Button
import androidx.compose.material.Text
import androidx.compose.runtime.*
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.kyhsgeekcode.disassembler.files.AbstractFile
import com.kyhsgeekcode.disassembler.R
import com.kyhsgeekcode.disassembler.files.AbstractFile
import com.kyhsgeekcode.disassembler.ui.components.HexTextField
import com.kyhsgeekcode.disassembler.ui.components.Spinner
import nl.lxtreme.binutils.elf.MachineType
import java.util.*
import java.util.Arrays


private val spinnerItems =
Expand Down
Loading

0 comments on commit 33234d1

Please sign in to comment.