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

A few params in modules's android/build.gradle need to be updated #11

Open
emclab opened this issue Mar 15, 2022 · 1 comment
Open

A few params in modules's android/build.gradle need to be updated #11

emclab opened this issue Mar 15, 2022 · 1 comment

Comments

@emclab
Copy link

emclab commented Mar 15, 2022

Here is the android/build.gradle for the module which has a few params updated:

buildscript {
    if (project == rootProject) {
        repositories {
            google()
            mavenCentral(). //<<==replace deprecated jcenter()
            //jcenter(). //<<==service no longer available
        }

        dependencies {
            classpath 'com.android.tools.build:gradle:3.5.3'
        }
    }
}

apply plugin: 'com.android.library'

def safeExtGet(prop, fallback) {
    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
    compileSdkVersion safeExtGet('Alioss_compileSdkVersion', 29)
    buildToolsVersion safeExtGet('Alioss_buildToolsVersion', '29.0.2')
    defaultConfig {
        minSdkVersion safeExtGet('Alioss_minSdkVersion', 16)
        targetSdkVersion safeExtGet('Alioss_targetSdkVersion', 29)
        versionCode 1
        versionName "1.0"

    }

    buildTypes {
        release {
            minifyEnabled false
        }
    }
    lintOptions {
        disable 'GradleCompatible'
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

repositories {
    mavenLocal()
    maven {
        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
        url("$rootDir/../node_modules/react-native/android")
    }
    google()
    mavenCentral(). //<<==replace deprecated jcenter()
    //jcenter(). //<<==service no longer available
}

dependencies {
    //noinspection GradleDynamicVersion
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation 'com.aliyun.dpa:oss-android-sdk:+'. //<<==implementation replaces obsolete compile
}
@hufans
Copy link
Owner

hufans commented Dec 10, 2022

Thank you so much

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

2 participants