flutter-pdf-text
flutter-pdf-text copied to clipboard
Modernize build.gradle: Migrate to mavenCentral(), Upgrade Gradle Plugin and SDK Versions
Summary
This issue suggests updates to the build.gradle file to ensure compatibility with the latest Android Gradle plugin and repository changes.
Changes
-
Replace
jcenter()withmavenCentral():- JCenter is being deprecated, so it's recommended to use Maven Central instead.
-
Update Gradle plugin version:
- Update the Gradle plugin version to
4.1.0to support the latest features and improvements.
- Update the Gradle plugin version to
-
Update
compileSdkVersion:- Update
compileSdkVersionto30to ensure compatibility with the latest Android SDK.
- Update
Updated build.gradle
group 'dev.aluc.pdf_text'
version '1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.5.20' <---
repositories {
google()
mavenCentral() <---
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0' <---
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral() <---
}
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 30 <--
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 16
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
disable 'InvalidPackage'
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.tom_roush:pdfbox-android:1.8.10.1'
}