Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MarlonJerold opened this issue Sep 27, 2024 · 0 comments

Comments

@MarlonJerold
Copy link

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 MarlonJerold changed the title Update build.gradle: replace jcenter() with mavenCentral(), update Gradle plugin and compileSdkVersion Modernize build.gradle: Migrate to mavenCentral(), Upgrade Gradle Plugin and SDK Versions Sep 27, 2024
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

No branches or pull requests

1 participant