Skip to content

Conversation

@allenlinli
Copy link

MisterJimson#166

Summary
This PR updates the build.gradle file to improve compatibility with the latest Android Gradle Plugin (AGP) and Kotlin version, while also enhancing the project’s structure and testing capabilities.

Changes
Updated Plugin and Library Versions:

Gradle Plugin: Upgraded from 7.4.2 to 8.1.0.
Kotlin Version: Added a new Kotlin dependency with ext.kotlin_version = "1.8.22".
Project Group and Version:

Converted group and version syntax from Groovy-style to Kotlin-style (= syntax).
Repositories:

Added mavenCentral() alongside google() in both buildscript and allprojects for broader dependency resolution.
Android Configuration:

Namespace Definition: Modified the namespace configuration to use the Kotlin-style assignment (=) syntax for AGP compatibility.
SDK Versions:
Increased compileSdk from 31 to 34.
Raised minSdk from 16 to 21 for improved compatibility with newer libraries.
Source Sets Configuration:

Updated sourceSets to include Kotlin-specific directories:
main.java.srcDirs += "src/main/kotlin"
test.java.srcDirs += "src/test/kotlin"
Code Quality and Compatibility:

Added kotlinOptions with jvmTarget = JavaVersion.VERSION_1_8 for consistency with compileOptions.
Impact
Improves compatibility with newer versions of Android and Kotlin.
Facilitates better test management with JUnitPlatform and standard logging configurations.
Aligns project structure with modern Android development practices by adding Kotlin support and increasing minimum SDK version.

@EchoEllet
Copy link
Owner

EchoEllet commented Jan 22, 2025

Same as the previous PR #6.

MisterJimson#166

I have reviewed the original PR in the upstream repo. What issues are you're trying to solve?

@allenlinli
Copy link
Author

I missed closing ths MR. Now I know PR #6 is fixed. That's awesome! Thank you.

@allenlinli allenlinli closed this Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants