From 07a01ffddba443a74e9bea4facfaf8849e449adb Mon Sep 17 00:00:00 2001 From: imashnake0 Date: Mon, 20 Jun 2022 22:43:52 -0400 Subject: [PATCH 01/11] Replace classpath with `plugins` DSL Replaced the old way of adding plugins to the classpath with plugins DSL: https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block. --- build.gradle | 18 ++++-------------- settings.gradle | 9 +++++++++ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index 0a229bb5e..540bd4371 100644 --- a/build.gradle +++ b/build.gradle @@ -1,18 +1,8 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:7.2.1' - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } +plugins { + id 'com.android.application' apply false version '7.2.1' + id 'org.jetbrains.kotlin.android' apply false version '1.7.0' } task clean(type: Delete) { delete rootProject.buildDir -} \ No newline at end of file +} diff --git a/settings.gradle b/settings.gradle index be6d8ccca..d89938f77 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,11 @@ +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} + dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { @@ -5,5 +13,6 @@ dependencyResolutionManagement { mavenCentral() } } + rootProject.name = "LibreTube" include ':app' From 3cfd505f45b401c95c0c3f26bd37be9c5b26b567 Mon Sep 17 00:00:00 2001 From: imashnake0 Date: Mon, 20 Jun 2022 22:44:22 -0400 Subject: [PATCH 02/11] Minor cleanup Added white spaces. --- app/build.gradle | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 969e97e7a..09780f3a8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -29,14 +29,17 @@ android { resValue "string", "app_name", "LibreTube Debug" } } + compileOptions { coreLibraryDesugaringEnabled true sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + kotlinOptions { jvmTarget = '1.8' } + splits { abi { enable true @@ -46,11 +49,13 @@ android { } } + packagingOptions { jniLibs { excludes += ['lib/armeabi-v7a/*_neon.so'] } } + namespace 'com.github.libretube' } @@ -76,14 +81,12 @@ dependencies { implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-jackson:2.9.0' - //do not update jackson annotations! it does not supports Date: Sat, 25 Jun 2022 01:52:52 -0400 Subject: [PATCH 03/11] Revert "Minor cleanup" This reverts commit 3cfd505f45b401c95c0c3f26bd37be9c5b26b567. --- app/build.gradle | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 09780f3a8..969e97e7a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -29,17 +29,14 @@ android { resValue "string", "app_name", "LibreTube Debug" } } - compileOptions { coreLibraryDesugaringEnabled true sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } - kotlinOptions { jvmTarget = '1.8' } - splits { abi { enable true @@ -49,13 +46,11 @@ android { } } - packagingOptions { jniLibs { excludes += ['lib/armeabi-v7a/*_neon.so'] } } - namespace 'com.github.libretube' } @@ -81,12 +76,14 @@ dependencies { implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-jackson:2.9.0' - // Do not update jackson annotations! It does not supports < API 26. + //do not update jackson annotations! it does not supports Date: Sat, 25 Jun 2022 04:00:23 -0400 Subject: [PATCH 04/11] Updated Gradle Reviewed release notes and updated Gradle to 7.4.2. --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index dbfa5e60e..2a99b6d35 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Dec 09 16:25:51 GST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME From b36b21725c225621b4b736fc51de1df64d63b8b8 Mon Sep 17 00:00:00 2001 From: imashnake0 Date: Sat, 25 Jun 2022 04:04:21 -0400 Subject: [PATCH 05/11] Added `libs` catalog Added version catalogs. --- app/build.gradle | 47 +++++++++++++++++++-------------------- gradle/libs.versions.toml | 43 +++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 24 deletions(-) create mode 100644 gradle/libs.versions.toml diff --git a/app/build.gradle b/app/build.gradle index 969e97e7a..794fb472d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -55,35 +55,34 @@ android { } dependencies { - //debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1' + //debugImplementation libs.square.leakcanary - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'androidx.constraintlayout:constraintlayout:2.1.3' - implementation 'com.google.android.material:material:1.6.0' - implementation 'androidx.navigation:navigation-fragment-ktx:2.4.2' - implementation 'androidx.navigation:navigation-ui-ktx:2.4.2' - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.preference:preference-ktx:1.2.0' + implementation libs.androidx.appcompat + implementation libs.androidx.constraintlayout + implementation libs.androidx.legacySupport + implementation libs.androidx.multidex + implementation libs.androidx.navigation.fragment + implementation libs.androidx.navigation.ui + implementation libs.androidx.preference - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + androidTestImplementation libs.androidx.test.junit + androidTestImplementation libs.androidx.test.espressoCore - implementation 'com.squareup.picasso:picasso:2.8' - implementation 'de.hdodenhof:circleimageview:3.1.0' - implementation 'com.google.android.exoplayer:exoplayer:2.17.1' - implementation 'com.google.android.exoplayer:extension-mediasession:2.17.1' - implementation 'androidx.multidex:multidex:2.0.1' + implementation libs.circleimageview - implementation 'com.squareup.retrofit2:retrofit:2.9.0' - implementation 'com.squareup.retrofit2:converter-jackson:2.9.0' - //do not update jackson annotations! it does not supports Date: Sat, 25 Jun 2022 20:28:29 +0430 Subject: [PATCH 06/11] Update gradle-wrapper.properties --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2a99b6d35..dbfa5e60e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Dec 09 16:25:51 GST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME From 36db98dd095dd8cf251d0616c1cefa9b6334ce9a Mon Sep 17 00:00:00 2001 From: archroid <50708771+archroid@users.noreply.github.com> Date: Sat, 25 Jun 2022 20:32:50 +0430 Subject: [PATCH 07/11] Update gradle-wrapper.properties --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index dbfa5e60e..945a17a6b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Dec 09 16:25:51 GST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME From efd2f54876e8a317aa006c7bf36549b0976f40b2 Mon Sep 17 00:00:00 2001 From: archroid <50708771+archroid@users.noreply.github.com> Date: Sat, 25 Jun 2022 20:40:31 +0430 Subject: [PATCH 08/11] Update gradle-wrapper.properties --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 945a17a6b..2a99b6d35 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Dec 09 16:25:51 GST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME From fac6abf56606ad3c8909c2e53c78a2d4257623a6 Mon Sep 17 00:00:00 2001 From: archroid <50708771+archroid@users.noreply.github.com> Date: Sat, 25 Jun 2022 20:56:09 +0430 Subject: [PATCH 09/11] Update build.gradle --- build.gradle | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 540bd4371..ac6cbecbb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,25 @@ -plugins { - id 'com.android.application' apply false version '7.2.1' - id 'org.jetbrains.kotlin.android' apply false version '1.7.0' +//plugins { + // id 'com.android.application' apply false version '7.2.1' + //id 'org.jetbrains.kotlin.android' apply false version '1.7.0' +//} + +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + google() + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:7.2.1' + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +task clean(type: Delete) { + delete rootProject.buildDir } task clean(type: Delete) { From d0c0c7fe3b658f8ff918048f9d799b1b58250643 Mon Sep 17 00:00:00 2001 From: archroid <50708771+archroid@users.noreply.github.com> Date: Sat, 25 Jun 2022 20:56:45 +0430 Subject: [PATCH 10/11] Update settings.gradle --- settings.gradle | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/settings.gradle b/settings.gradle index d89938f77..8ef48f67a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,10 +1,10 @@ -pluginManagement { - repositories { - gradlePluginPortal() - google() - mavenCentral() - } -} +//pluginManagement { + // repositories { + //gradlePluginPortal() + // google() + // mavenCentral() + // } +//} dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) From cc73cd14c76739edd2c5f3137a1eb10c25939d2e Mon Sep 17 00:00:00 2001 From: archroid <50708771+archroid@users.noreply.github.com> Date: Sat, 25 Jun 2022 20:59:26 +0430 Subject: [PATCH 11/11] Update build.gradle --- build.gradle | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build.gradle b/build.gradle index ac6cbecbb..719afea14 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,3 @@ buildscript { task clean(type: Delete) { delete rootProject.buildDir } - -task clean(type: Delete) { - delete rootProject.buildDir -}