flutter-pdf-text icon indicating copy to clipboard operation
flutter-pdf-text copied to clipboard

Modernize build.gradle: Migrate to mavenCentral(), Upgrade Gradle Plugin and SDK Versions

Open MarlonJerold opened this issue 1 year ago • 1 comments

Summary

This issue suggests updates to the build.gradle file to ensure compatibility with the latest Android Gradle plugin and repository changes.

Changes

  1. Replace jcenter() with mavenCentral():

    • JCenter is being deprecated, so it's recommended to use Maven Central instead.
  2. Update Gradle plugin version:

    • Update the Gradle plugin version to 4.1.0 to support the latest features and improvements.
  3. Update compileSdkVersion:

    • Update compileSdkVersion to 30 to ensure compatibility with the latest Android SDK.

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'
}

MarlonJerold avatar Sep 27 '24 05:09 MarlonJerold