Skip to content

Commit

Permalink
fix(deps): update dependency com.android.tools.build:gradle to v8
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and wax911 committed Aug 4, 2024
1 parent f743c0e commit 1dc2953
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 97 deletions.
11 changes: 11 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 18 additions & 36 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,74 +13,56 @@ android {
}
}

val prettyTime = "4.0.4.Final"
val butterKnife = "10.2.3"
val multidex = "2.0.1"
val materialDialogs = "0.9.6.0"
val tapTarget = "3.3.2"
val jiaoziVideoPlayer = "7.7.2.3300"
val photoView = "2.3.0"
val onboarder = "1.0.4"
val mpAndroidChart = "3.1.0"
val aboutPage = "1.3.1"
val materialSearchView = "1.4.18"
val progressLayout = "master-SNAPSHOT"
val eventBus = "3.3.1"
val alerter = "7.0.1"
val stream = "1.2.2"
val circularProgressView = "2.5.0"
val txtmark = "0.16"

dependencies {
/** Butter Knife Libraries */
implementation("com.jakewharton:butterknife:${butterKnife}")
kapt("com.jakewharton:butterknife-compiler:${butterKnife}")
implementation(libs.butterknife)
kapt(libs.butterknife.compiler)

/** Material Dialogs */
implementation("com.afollestad.material-dialogs:core:${materialDialogs}")
implementation(libs.material.dialogs.core)

/** Tap Target Prompt */
implementation("uk.co.samuelwall:material-tap-target-prompt:${tapTarget}")
implementation(libs.material.tap.target.prompt)

/** Pretty Time */
implementation("org.ocpsoft.prettytime:prettytime:${prettyTime}")
implementation(libs.prettyTime)

/** Highly Customizable Video Player */
implementation("cn.jzvd:jiaozivideoplayer:${jiaoziVideoPlayer}")
implementation(libs.jiaozivideoplayer)

/** Photo View */
implementation("com.github.chrisbanes:PhotoView:${photoView}")
implementation(libs.photoview)

/** On-boarding Experience */
implementation("com.codemybrainsout.onboarding:onboarder:${onboarder}")
implementation(libs.onboarder)

/** Charts */
implementation("com.github.PhilJay:MPAndroidChart:v${mpAndroidChart}")
implementation(libs.mpandroidchart)

/** About Library */
implementation("com.github.medyo:android-about-page:${aboutPage}")
implementation(libs.android.about.page)

/** Multi Dex */
implementation("androidx.multidex:multidex:${multidex}")
implementation(libs.androidx.multidex)

/** Material Search View */
implementation("com.github.ma-myair:MaterialSearchView:${materialSearchView}")
implementation(libs.materialsearchview)

/** State Layout Library */
implementation("com.github.nguyenhoanglam:ProgressLayout:${progressLayout}")
implementation(libs.progresslayout)

/** Event Bus Library */
implementation("org.greenrobot:eventbus:${eventBus}")
implementation(libs.eventbus)

/** Alerter */
implementation("com.tapadoo.android:alerter:${alerter}")
implementation(libs.alerter)

/** Stream */
implementation("com.annimon:stream:${stream}")
implementation(libs.stream)

/** Circular Progress View */
implementation("com.github.rahatarmanahmed:circularprogressview:${circularProgressView}")
implementation(libs.circularprogressview)

/** Txtmark */
implementation("es.nitaur.markdown:txtmark:${txtmark}")
implementation(libs.txtmark)
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import androidx.core.content.ContextCompat;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelProviders;

import com.miguelcatalan.materialsearchview.MaterialSearchView;
import com.mxt.anitrend.R;
Expand All @@ -31,6 +30,7 @@
import com.mxt.anitrend.base.custom.sheet.BottomSheetBase;
import com.mxt.anitrend.base.custom.viewmodel.ViewModelBase;
import com.mxt.anitrend.base.interfaces.event.ResponseCallback;
import com.mxt.anitrend.databinding.CustomToolbarBinding;
import com.mxt.anitrend.extension.KoinExt;
import com.mxt.anitrend.util.CompatUtil;
import com.mxt.anitrend.util.ConfigurationUtil;
Expand Down Expand Up @@ -170,23 +170,19 @@ public void disableToolbarTitle() {
}

protected void setTransparentStatusBar() {
if (Build.VERSION.SDK_INT >= 21) {
Window window = getWindow();
window.getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
int color = ContextCompat.getColor(this, android.R.color.transparent);
window.setStatusBarColor(color);
}
Window window = getWindow();
window.getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
int color = ContextCompat.getColor(this, android.R.color.transparent);
window.setStatusBarColor(color);
}

protected void setTransparentStatusBarWithColor() {
if (Build.VERSION.SDK_INT >= 21) {
Window window = getWindow();
int color = ContextCompat.getColor(this, R.color.colorTransparent);
window.setStatusBarColor(color);
window.setNavigationBarColor(color);
}
Window window = getWindow();
int color = ContextCompat.getColor(this, R.color.colorTransparent);
window.setStatusBarColor(color);
window.setNavigationBarColor(color);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import io.github.wax911.library.converter.GraphConverter
import io.github.wax911.library.converter.request.GraphRequestConverter
import io.github.wax911.library.model.request.QueryContainerBuilder
import okhttp3.MediaType
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.RequestBody
import okhttp3.RequestBody.Companion.toRequestBody
import timber.log.Timber

class AniRequestConverter(
Expand Down Expand Up @@ -37,6 +39,6 @@ class AniRequestConverter(

val queryJson = gson.toJson(queryContainer)

return RequestBody.create(MediaType.parse(GraphConverter.MimeType), queryJson)
return queryJson.toRequestBody(GraphConverter.MimeType.toMediaTypeOrNull())
}
}
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ allprojects {

tasks {
val clean by registering(Delete::class) {
delete(rootProject.buildDir)
delete(rootProject.layout.buildDirectory)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ private fun BaseAppModuleExtension.setUpWith(project: Project) {
buildFeatures {
dataBinding = true
viewBinding = true
buildConfig = true
}
buildTypes {
getByName("release") {
Expand All @@ -159,7 +160,7 @@ private fun BaseAppModuleExtension.setUpWith(project: Project) {
configureBuildFlavours()
}

packagingOptions {
packaging {
resources.excludes.add("META-INF/NOTICE.*")
resources.excludes.add("META-INF/LICENSE*")
// Exclude potential duplicate kotlin_module files
Expand Down Expand Up @@ -193,21 +194,18 @@ private fun BaseAppModuleExtension.setUpWith(project: Project) {
}

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

internal fun Project.applyAndroidConfiguration() {
val baseExtension = baseExtension()
val appExtension = baseAppExtension()
val androidExtension = androidExtensionsExtension()

baseExtension.setUpWith(this)
appExtension.setUpWith(this)

androidExtension.isExperimental = true

configurations.all {
exclude("org.jetbrains", "annotations-java5")
resolutionStrategy.force(
Expand All @@ -220,7 +218,7 @@ internal fun Project.applyAndroidConfiguration() {

tasks.withType(KotlinJvmCompile::class.java) {
kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
package com.mxt.anitrend.buildsrc.components

import com.mxt.anitrend.buildsrc.extensions.baseExtension
import com.mxt.anitrend.buildsrc.extensions.androidComponents
import org.gradle.api.Project

internal fun Project.configurePlugins() {
plugins.apply("com.android.application")
plugins.apply("kotlin-android")
plugins.apply("kotlinx-serialization")
plugins.apply("kotlin-android-extensions")
plugins.apply("kotlin-parcelize")
plugins.apply("kotlin-kapt")
plugins.apply("io.objectbox")
}

internal fun Project.configureAdditionalPlugins() {
baseExtension().variantFilter {
if (flavors.first().name == "app") {
println("Applying additional google plugins on -> variant: $name | type: $buildType")
androidComponents().beforeVariants {
logger.lifecycle("VariantFilter { name: ${it.name}, flavor: ${it.flavorName}, module: $name }")
if (it.flavorName == "google") {
logger.lifecycle("Applying additional google plugins on -> module: $name | type: ${it.name}")
if (file("google-services.json").exists()) {
plugins.apply("com.google.gms.google-services")
plugins.apply("com.google.firebase.crashlytics")
} else println("google-services.json cannot be found and will not be using any of the google plugins")
} else logger.lifecycle("google-services.json cannot be found and will not be using any of the google plugins")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private fun DependencyHandler.addDependency(
* Adds a dependency to the given configuration, and configures the dependency using the given closure.
*
* @param dependencyNotation The dependency notation, in one of the notations described above.
* @param configureClosure The closure to use to configure the dependency.
* @param dependencyConfiguration The closure to use to configure the dependency.
*
* @return The dependency.
*/
Expand All @@ -128,7 +128,7 @@ internal fun DependencyHandler.kapt(
* Adds a dependency to the given configuration, and configures the dependency using the given closure.
*
* @param dependencyNotation The dependency notation, in one of the notations described above.
* @param configureClosure The closure to use to configure the dependency.
* @param dependencyConfiguration The closure to use to configure the dependency.
*
* @return The dependency.
*/
Expand All @@ -141,7 +141,7 @@ internal fun DependencyHandler.api(
* Adds a dependency to the given configuration, and configures the dependency using the given closure.
*
* @param dependencyNotation The dependency notation, in one of the notations described above.
* @param configureClosure The closure to use to configure the dependency.
* @param dependencyConfiguration The closure to use to configure the dependency.
*
* @return The dependency.
*/
Expand All @@ -154,7 +154,7 @@ internal fun DependencyHandler.compile(
* Adds a dependency to the given configuration, and configures the dependency using the given closure.
*
* @param dependencyNotation The dependency notation, in one of the notations described above.
* @param configureClosure The closure to use to configure the dependency.
* @param dependencyConfiguration The closure to use to configure the dependency.
*
* @return The dependency.
*/
Expand All @@ -167,7 +167,7 @@ internal fun DependencyHandler.debug(
* Adds a dependency to the given configuration, and configures the dependency using the given closure.
*
* @param dependencyNotation The dependency notation, in one of the notations described above.
* @param configureClosure The closure to use to configure the dependency.
* @param dependencyConfiguration The closure to use to configure the dependency.
*
* @return The dependency.
*/
Expand All @@ -180,7 +180,7 @@ internal fun DependencyHandler.implementation(
* Adds a dependency to the given configuration, and configures the dependency using the given closure.
*
* @param dependencyNotation The dependency notation, in one of the notations described above.
* @param configureClosure The closure to use to configure the dependency.
* @param dependencyConfiguration The closure to use to configure the dependency.
*
* @return The dependency.
*/
Expand All @@ -193,7 +193,7 @@ internal fun DependencyHandler.debugImplementation(
* Adds a dependency to the given configuration, and configures the dependency using the given closure.
*
* @param dependencyNotation The dependency notation, in one of the notations described above.
* @param configureClosure The closure to use to configure the dependency.
* @param dependencyConfiguration The closure to use to configure the dependency.
*
* @return The dependency.
*/
Expand All @@ -206,7 +206,7 @@ internal fun DependencyHandler.releaseImplementation(
* Adds a dependency to the given configuration, and configures the dependency using the given closure.
*
* @param dependencyNotation The dependency notation, in one of the notations described above.
* @param configureClosure The closure to use to configure the dependency.
* @param dependencyConfiguration The closure to use to configure the dependency.
*
* @return The dependency.
*/
Expand All @@ -219,7 +219,7 @@ internal fun DependencyHandler.runtime(
* Adds a dependency to the given configuration, and configures the dependency using the given closure.
*
* @param dependencyNotation The dependency notation, in one of the notations described above.
* @param configureClosure The closure to use to configure the dependency.
* @param dependencyConfiguration The closure to use to configure the dependency.
*
* @return The dependency.
*/
Expand All @@ -232,7 +232,7 @@ internal fun DependencyHandler.testImplementation(
* Adds a dependency to the given configuration, and configures the dependency using the given closure.
*
* @param dependencyNotation The dependency notation, in one of the notations described above.
* @param configureClosure The closure to use to configure the dependency.
* @param dependencyConfiguration The closure to use to configure the dependency.
*
* @return The dependency.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package com.mxt.anitrend.buildsrc.extensions

import com.android.build.api.variant.ApplicationAndroidComponentsExtension
import com.android.build.gradle.BaseExtension
import com.android.build.gradle.internal.dsl.BaseAppModuleExtension
import com.mxt.anitrend.buildsrc.components.PropertiesReader
Expand Down Expand Up @@ -45,6 +46,9 @@ fun Project.version(alias: String) =
internal fun Project.baseExtension() =
extensions.getByType<BaseExtension>()

internal fun Project.androidComponents() =
extensions.getByType<ApplicationAndroidComponentsExtension>()

internal fun Project.baseAppExtension() =
extensions.getByType<BaseAppModuleExtension>()

Expand Down
Loading

0 comments on commit 1dc2953

Please sign in to comment.