**basic gradle stuff**

* Android gradle plugin to 7.0.0
* gradle to 7.4.1

**dependencies**

* gson to 2.9.0
* stormpot to 3.1 (has breaking changes)
* commons io to 2.11.0 (has breaking changes)
* guava to 31.1
* acra to 5.8.4 (has breaking changes)

Co-authored-by: qwerty287 <ndev@web.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1094
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
qwerty287 2022-03-27 20:41:20 +02:00 committed by M M Arif
parent 062fb9e9fd
commit 8ff0c337a3
6 changed files with 21 additions and 15 deletions

View File

@ -11,9 +11,6 @@ android {
multiDexEnabled true multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
dexOptions {
javaMaxHeapSize "4g"
}
flavorDimensions "default" flavorDimensions "default"
productFlavors { productFlavors {
free { free {
@ -48,6 +45,10 @@ android {
} }
} }
repositories {
mavenCentral()
}
configurations { configurations {
cleanedAnnotations cleanedAnnotations
compile.exclude group: 'org.jetbrains', module: 'annotations' compile.exclude group: 'org.jetbrains', module: 'annotations'
@ -57,7 +58,7 @@ dependencies {
def lifecycle_version = '2.4.1' def lifecycle_version = '2.4.1'
def markwon_version = '4.6.2' def markwon_version = '4.6.2'
def work_version = "2.7.1" def work_version = "2.7.1"
def acra = "5.7.0" def acra = '5.8.4'
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'androidx.appcompat:appcompat:1.4.1'
@ -70,7 +71,7 @@ dependencies {
androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.2' implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.2'
implementation "com.google.code.gson:gson:2.8.9" implementation "com.google.code.gson:gson:2.9.0"
implementation "com.squareup.picasso:picasso:2.71828" implementation "com.squareup.picasso:picasso:2.71828"
implementation 'jp.wasabeef:picasso-transformations:2.4.0' implementation 'jp.wasabeef:picasso-transformations:2.4.0'
implementation 'jp.co.cyberagent.android:gpuimage:2.1.0' implementation 'jp.co.cyberagent.android:gpuimage:2.1.0'
@ -95,10 +96,11 @@ dependencies {
implementation "io.noties.markwon:simple-ext:$markwon_version" implementation "io.noties.markwon:simple-ext:$markwon_version"
implementation 'org.codeberg.qwerty287:markwonprism4j:9d3ef078cd' implementation 'org.codeberg.qwerty287:markwonprism4j:9d3ef078cd'
implementation 'org.codeberg.qwerty287:Prism4j:3.0.0' implementation 'org.codeberg.qwerty287:Prism4j:3.0.0'
implementation 'com.google.guava:guava:29.0-android' implementation 'com.google.guava:guava:31.1-android'
implementation "io.noties.markwon:image-picasso:$markwon_version" implementation "io.noties.markwon:image-picasso:$markwon_version"
implementation "com.github.HamidrezaAmz:BreadcrumbsView:0.2.9" implementation "com.github.HamidrezaAmz:BreadcrumbsView:0.2.9"
implementation "commons-io:commons-io:20030203.000550" //noinspection GradleDependency
implementation 'commons-io:commons-io:2.11.0' // do not "upgrade" to 20030203.000550 - this was published over 15 years ago
implementation 'org.apache.commons:commons-lang3:3.12.0' implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation "com.github.chrisbanes:PhotoView:2.3.0" implementation "com.github.chrisbanes:PhotoView:2.3.0"
implementation "ch.acra:acra-mail:$acra" implementation "ch.acra:acra-mail:$acra"

View File

@ -17,6 +17,7 @@ import androidx.activity.result.contract.ActivityResultContracts;
import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationCompat;
import com.vdurmont.emoji.EmojiParser; import com.vdurmont.emoji.EmojiParser;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.gitnex.tea4j.models.Files; import org.gitnex.tea4j.models.Files;
import org.mian.gitnex.R; import org.mian.gitnex.R;
import org.mian.gitnex.clients.RetrofitClient; import org.mian.gitnex.clients.RetrofitClient;
@ -99,7 +100,7 @@ public class FileViewActivity extends BaseActivity implements BottomSheetListene
if(responseBody != null) { if(responseBody != null) {
runOnUiThread(() -> binding.progressBar.setVisibility(View.GONE)); runOnUiThread(() -> binding.progressBar.setVisibility(View.GONE));
String fileExtension = FileUtils.getExtension(filename); String fileExtension = FilenameUtils.getExtension(filename);
boolean processable = false; boolean processable = false;
@ -216,7 +217,7 @@ public class FileViewActivity extends BaseActivity implements BottomSheetListene
inflater.inflate(R.menu.generic_nav_dotted_menu, menu); inflater.inflate(R.menu.generic_nav_dotted_menu, menu);
inflater.inflate(R.menu.files_view_menu, menu); inflater.inflate(R.menu.files_view_menu, menu);
if(!FileUtils.getExtension(file.getName()) if(!FilenameUtils.getExtension(file.getName())
.equalsIgnoreCase("md")) { .equalsIgnoreCase("md")) {
menu.getItem(0) menu.getItem(0)

View File

@ -160,7 +160,7 @@ public class SettingsSecurityActivity extends BaseActivity {
try { try {
FileUtils.deleteDirectory(cacheDir); FileUtils.deleteDirectory(cacheDir);
FileUtils.mkdir(cacheDir.getAbsolutePath()); FileUtils.forceMkdir(cacheDir);
this.recreate(); this.recreate();
this.overridePendingTransition(0, 0); this.overridePendingTransition(0, 0);
} }

View File

@ -90,9 +90,12 @@ public class MainApplication extends Application {
CoreConfigurationBuilder ACRABuilder = new CoreConfigurationBuilder(this); CoreConfigurationBuilder ACRABuilder = new CoreConfigurationBuilder(this);
ACRABuilder.setBuildConfigClass(BuildConfig.class).setReportFormat(StringFormat.KEY_VALUE_LIST); ACRABuilder.withBuildConfigClass(BuildConfig.class).setReportFormat(StringFormat.KEY_VALUE_LIST);
ACRABuilder.getPluginConfigurationBuilder(MailSenderConfigurationBuilder.class).setReportAsFile(true).setMailTo(getResources().getString(R.string.appEmail)).setSubject(getResources().getString(R.string.crashReportEmailSubject, AppUtil ACRABuilder.getPluginConfigurationBuilder(MailSenderConfigurationBuilder.class).withMailTo(getResources().getString(R.string.appEmail))
.getAppBuildNo(context))).setEnabled(true); .withSubject(getResources().getString(R.string.crashReportEmailSubject, AppUtil
.getAppBuildNo(context)))
.withReportAsFile(true)
.withEnabled(true);
ACRABuilder.getPluginConfigurationBuilder(LimiterConfigurationBuilder.class).setEnabled(true); ACRABuilder.getPluginConfigurationBuilder(LimiterConfigurationBuilder.class).setEnabled(true);
ACRA.init(this, ACRABuilder); ACRA.init(this, ACRABuilder);

View File

@ -7,7 +7,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.2.2' classpath 'com.android.tools.build:gradle:7.0.0'
} }
} }

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-all.zip