Skip to content

Commit

Permalink
update dependencies and agp version
Browse files Browse the repository at this point in the history
  • Loading branch information
itsvks19 committed Jan 18, 2024
1 parent c7fafe5 commit 4e91d3c
Show file tree
Hide file tree
Showing 10 changed files with 196 additions and 232 deletions.
51 changes: 25 additions & 26 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ plugins {
}

android {
compileSdk 33
buildToolsVersion "33.0.0"
compileSdk 34
namespace "com.itsvks.layouteditor"

defaultConfig {
applicationId "com.itsvks.layouteditor"
minSdk 26
targetSdk 33
targetSdk 34
versionCode 6
versionName project.versionName
}
Expand All @@ -37,16 +37,17 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '11'
jvmTarget = '17'
}

buildFeatures {
viewBinding true
buildConfig true
}

packagingOptions {
Expand All @@ -59,39 +60,37 @@ android {
}

dependencies {
def lifecycle_version = "2.5.1"
def activity_version = "1.6.1"

implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
def lifecycle_version = '2.7.0'
def activity_version = '1.8.2'

implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.activity:activity:$activity_version"
implementation "androidx.activity:activity-ktx:$activity_version"

implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.core:core:1.9.0'
implementation 'androidx.preference:preference:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.3.0-rc01'
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
implementation 'androidx.palette:palette:1.0.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta02'
implementation 'androidx.palette:palette-ktx:1.0.0'

implementation 'com.google.android.material:material:1.8.0-alpha03'
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
implementation 'com.google.code.gson:gson:2.10'
implementation 'com.google.android.material:material:1.11.0'
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.1'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.blankj:utilcodex:1.31.1'
implementation 'com.github.bumptech.glide:glide:4.14.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2'
implementation 'com.github.bumptech.glide:glide:4.16.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
implementation 'com.jsibbold:zoomage:1.3.1'

implementation platform("io.github.Rosemoe.sora-editor:bom:0.21.0")
implementation platform('io.github.Rosemoe.sora-editor:bom:0.22.2')
implementation "io.github.Rosemoe.sora-editor:editor"
implementation "io.github.Rosemoe.sora-editor:language-textmate"

implementation 'org.apache.commons:commons-text:1.9'
implementation 'org.apache.commons:commons-text:1.11.0'

implementation 'commons-io:commons-io:2.11.0'
implementation 'commons-io:commons-io:2.15.1'

implementation project(':vectormaster')

debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.13'
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,38 +80,36 @@ private void navigationDrawer() {
item -> {
var id = item.getItemId();

switch (id) {
case R.id.nav_home:
drawerLayout.closeDrawer(GravityCompat.START);
goToHome();
navigationView.setCheckedItem(R.id.nav_home);
return true;
case R.id.nav_preference:
drawerLayout.closeDrawer(GravityCompat.START);
goToPreference();
navigationView.setCheckedItem(R.id.nav_preference);
return true;
case R.id.nav_about:
drawerLayout.closeDrawer(GravityCompat.START);
goToAbout();
navigationView.setCheckedItem(R.id.nav_about);
return true;
case R.id.nav_licence:
startActivity(new Intent(this, OssLicensesMenuActivity.class));
return true;
case R.id.nav_github:
openUrl(Constants.GITHUB_URL);
return true;
case R.id.nav_share:
var shareIntent = new ShareCompat.IntentBuilder(this);
shareIntent.setType("text/plain");
shareIntent.setChooserTitle(getString(R.string.app_name));
shareIntent.setText(getString(R.string.share_description, Constants.GITHUB_URL));
shareIntent.startChooser();
return true;
default:
return false;
if (id == R.id.nav_home) {
drawerLayout.closeDrawer(GravityCompat.START);
goToHome();
navigationView.setCheckedItem(R.id.nav_home);
return true;
} else if (id == R.id.nav_preference) {
drawerLayout.closeDrawer(GravityCompat.START);
goToPreference();
navigationView.setCheckedItem(R.id.nav_preference);
return true;
} else if (id == R.id.nav_about) {
drawerLayout.closeDrawer(GravityCompat.START);
goToAbout();
navigationView.setCheckedItem(R.id.nav_about);
return true;
} else if (id == R.id.nav_licence) {
startActivity(new Intent(this, OssLicensesMenuActivity.class));
return true;
} else if (id == R.id.nav_github) {
openUrl(Constants.GITHUB_URL);
return true;
} else if (id == R.id.nav_share) {
var shareIntent = new ShareCompat.IntentBuilder(this);
shareIntent.setType("text/plain");
shareIntent.setChooserTitle(getString(R.string.app_name));
shareIntent.setText(getString(R.string.share_description, Constants.GITHUB_URL));
shareIntent.startChooser();
return true;
}
return false;
});
navigationView.setCheckedItem(R.id.nav_home);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,46 +144,45 @@ private void showOptions(View v, int position, VH holder) {
public boolean onMenuItemClick(MenuItem item) {

var id = item.getItemId();
switch (id) {
case R.id.menu_copy_name:
ClipboardUtils.copyText(
drawableList
.get(position)
.getName()
.substring(0, drawableList.get(position).getName().lastIndexOf(".")));
SBUtils.make(holder.binding.getRoot(), v.getContext().getString(R.string.copied))
.setSlideAnimation()
.showAsSuccess();
return true;
case R.id.menu_delete:
new MaterialAlertDialogBuilder(v.getContext())
.setTitle(R.string.remove_drawable)
.setMessage(R.string.msg_remove_drawable)
.setNegativeButton(R.string.no, (d, w) -> d.dismiss())
.setPositiveButton(
R.string.yes,
(d, w) -> {
var name = drawableList.get(position).getName();
if (name.substring(0, name.lastIndexOf(".")).equals("default_image")) {
SBUtils.make(
v,
v.getContext()
.getString(
R.string.msg_cannot_delete_default, "image"))
.setFadeAnimation()
.setType(SBUtils.Type.INFO)
.show();
} else {
FileUtil.deleteFile(drawableList.get(position).getPath());
drawableList.remove(position);
notifyDataSetChanged();
}
})
.show();
return true;
case R.id.menu_rename:
rename(v, position, holder);
return true;
if (id == R.id.menu_copy_name) {
ClipboardUtils.copyText(
drawableList
.get(position)
.getName()
.substring(0, drawableList.get(position).getName().lastIndexOf(".")));
SBUtils.make(holder.binding.getRoot(), v.getContext().getString(R.string.copied))
.setSlideAnimation()
.showAsSuccess();
return true;
} else if (id == R.id.menu_delete) {
new MaterialAlertDialogBuilder(v.getContext())
.setTitle(R.string.remove_drawable)
.setMessage(R.string.msg_remove_drawable)
.setNegativeButton(R.string.no, (d, w) -> d.dismiss())
.setPositiveButton(
R.string.yes,
(d, w) -> {
var name = drawableList.get(position).getName();
if (name.substring(0, name.lastIndexOf(".")).equals("default_image")) {
SBUtils.make(
v,
v.getContext()
.getString(
R.string.msg_cannot_delete_default, "image"))
.setFadeAnimation()
.setType(SBUtils.Type.INFO)
.show();
} else {
FileUtil.deleteFile(drawableList.get(position).getPath());
drawableList.remove(position);
notifyDataSetChanged();
}
})
.show();
return true;
} else if (id == R.id.menu_rename) {
rename(v, position, holder);
return true;
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,36 +105,35 @@ private void showOptions(View v, int position, VH holder) {
public boolean onMenuItemClick(MenuItem item) {

var id = item.getItemId();
switch (id) {
case R.id.menu_delete:
new MaterialAlertDialogBuilder(v.getContext())
.setTitle(R.string.remove_font)
.setMessage(R.string.msg_remove_font)
.setNegativeButton(R.string.no, (d, w) -> d.dismiss())
.setPositiveButton(
R.string.yes,
(d, w) -> {
var name = fontList.get(position).getName();
if (name.substring(0, name.lastIndexOf(".")).equals("default_font")) {
SBUtils.make(
v,
v.getContext()
.getString(
R.string.msg_cannot_delete_default, "font"))
.setFadeAnimation()
.setType(SBUtils.Type.INFO)
.show();
} else {
FileUtil.deleteFile(fontList.get(position).getPath());
fontList.remove(position);
notifyDataSetChanged();
}
})
.show();
return true;
case R.id.menu_rename:
rename(v, position, holder);
return true;
if (id == R.id.menu_delete) {
new MaterialAlertDialogBuilder(v.getContext())
.setTitle(R.string.remove_font)
.setMessage(R.string.msg_remove_font)
.setNegativeButton(R.string.no, (d, w) -> d.dismiss())
.setPositiveButton(
R.string.yes,
(d, w) -> {
var name = fontList.get(position).getName();
if (name.substring(0, name.lastIndexOf(".")).equals("default_font")) {
SBUtils.make(
v,
v.getContext()
.getString(
R.string.msg_cannot_delete_default, "font"))
.setFadeAnimation()
.setType(SBUtils.Type.INFO)
.show();
} else {
FileUtil.deleteFile(fontList.get(position).getPath());
fontList.remove(position);
notifyDataSetChanged();
}
})
.show();
return true;
} else if (id == R.id.menu_rename) {
rename(v, position, holder);
return true;
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,43 +110,42 @@ private void showOptions(View v, int position) {
popupMenu.setOnMenuItemClickListener(
item -> {
var id = item.getItemId();
switch (id) {
case R.id.menu_copy_name:
ClipboardUtils.copyText(stringList.get(position).name);
SBUtils.make(
v,
v.getContext().getString(R.string.copied)
+ " "
+ stringList.get(position).name)
.setSlideAnimation()
.showAsSuccess();
return true;
case R.id.menu_delete:
new MaterialAlertDialogBuilder(v.getContext())
.setTitle("Remove String")
.setMessage(
String.format("Do you want to remove %s?", stringList.get(position).name))
.setNegativeButton(R.string.no, null)
.setPositiveButton(
R.string.yes,
(d, w) -> {
var name = stringList.get(position).name;
if (name.equals("default_string")) {
SBUtils.make(
v,
v.getContext()
.getString(R.string.msg_cannot_delete_default, "string"))
.setFadeAnimation()
.setType(SBUtils.Type.INFO)
.show();
} else {
stringList.remove(position);
notifyDataSetChanged();
generateStringsXml();
}
})
.show();
return true;
if (id == R.id.menu_copy_name) {
ClipboardUtils.copyText(stringList.get(position).name);
SBUtils.make(
v,
v.getContext().getString(R.string.copied)
+ " "
+ stringList.get(position).name)
.setSlideAnimation()
.showAsSuccess();
return true;
} else if (id == R.id.menu_delete) {
new MaterialAlertDialogBuilder(v.getContext())
.setTitle("Remove String")
.setMessage(
String.format("Do you want to remove %s?", stringList.get(position).name))
.setNegativeButton(R.string.no, null)
.setPositiveButton(
R.string.yes,
(d, w) -> {
var name = stringList.get(position).name;
if (name.equals("default_string")) {
SBUtils.make(
v,
v.getContext()
.getString(R.string.msg_cannot_delete_default, "string"))
.setFadeAnimation()
.setType(SBUtils.Type.INFO)
.show();
} else {
stringList.remove(position);
notifyDataSetChanged();
generateStringsXml();
}
})
.show();
return true;
}
return false;
});
Expand Down
Loading

0 comments on commit 4e91d3c

Please sign in to comment.