build.gradle 5.38 KB
apply plugin: 'maven'

buildscript {
    ext.kotlin_version = "1.4.32"
    repositories {
        mavenLocal()
        mavenCentral()
        // 以下四行代码为阿里gradle源,需要的人自己放開使用
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        maven { url 'https://maven.aliyun.com/repository/jcenter' }
        maven { url 'https://maven.aliyun.com/nexus/content/repositories/releases' }
        //阿里云 maven
        maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
        maven { url 'https://maven.aliyun.com/repository/releases' }

        google()

        maven { url "https://jitpack.io" }
        //华为
        maven { url 'https://developer.huawei.com/repo/' }
        //阿里云QuickTracking
        maven { url 'https://repo1.maven.org/maven2/' }

        maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
        maven {
            url 'https://maven.aliyun.com/nexus/content/repositories/google/'
            name 'aliyun-google'
        }

        // TingYun
        maven { url "https://nexus2.tingyun.com/nexus/content/repositories/snapshots/" }
    }

    dependencies {
        classpath "com.android.tools.build:gradle:4.0.2"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.billy.android:autoregister:1.4.2'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        mavenCentral()
        // 以下四行代码为阿里gradle源,需要的人自己放開使用
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        maven { url 'https://maven.aliyun.com/repository/jcenter' }
        maven { url 'https://maven.aliyun.com/nexus/content/repositories/releases' }
        //阿里云 maven
        maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
        maven { url 'https://maven.aliyun.com/repository/releases' }
        google()

        maven { url "https://jitpack.io" }
        //华为
        maven { url 'https://developer.huawei.com/repo/' }
        //阿里云QuickTracking
        maven { url 'https://repo1.maven.org/maven2/' }
        maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
        maven {
            url 'https://maven.aliyun.com/nexus/content/repositories/google/'
            name 'aliyun-google'
        }

        flatDir { dirs 'src/main/libs' }
    }

    project.configurations.configureEach {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.android.android.support' && !details.requested.name.contains('multidex')) {
                details.useVersion "28.0.0"
            }

        }
    }

    //  强制依赖
    configurations.configureEach {
        exclude group: 'com.alipay.android.phone.thirdparty', module: 'securityguard-build'
        resolutionStrategy {
            force 'androidx.activity:activity:1.2.1'
            force 'androidx.annotation:annotation:1.1.0'
            force 'androidx.appcompat:appcompat:1.2.0'
            force 'androidx.arch.core:core-common:2.1.0'
            force 'androidx.arch.core:core-runtime:2.1.0'
            force 'androidx.core:core-ktx:1.6.0'
            force 'androidx.core:core:1.5.0'
            force 'androidx.collection:collection:1.1.0'
            force 'androidx.constraintlayout:constraintlayout:2.0.4'
            force 'androidx.constraintlayout:constraintlayout-solver:2.0.4'
            force 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
            force 'androidx.fragment:fragment:1.3.1'
            force 'androidx.lifecycle:lifecycle-common:2.3.0'
            force 'androidx.multidex:multidex:2.0.1'
            force 'androidx.recyclerview:recyclerview:1.2.0'
            force 'androidx.vectordrawable:vectordrawable:1.1.0'
            force 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
            force 'com.squareup.okhttp3:okhttp:4.9.1'
            force 'com.squareup.okio:okio:2.7.0'
            force 'org.jetbrains.kotlin:kotlin-stdlib:1.4.32'
            force 'org.jetbrains.kotlin:kotilin-stdlib-jdk8:1.4.32'
            force 'org.jetbrains:annotations:15.0'
            force 'net.sf.proguard:proguard-base:6.1.0'
        }
    }
}

ext {
    var = [
            // SDK And Tools
            applicationId    : "com.wondertek.dss",
            minSdkVersion    : 25,
            targetSdkVersion : 30,
            compileSdkVersion: 30,
            buildToolsVersion: "30.0.3",
            // 版本号,正式版本 1.0.0  1000080  后两位,80即标识为发布版本
            // 测试版本  1.0.0_TF1     1000001  后两位,01即为测试版本号,01-79
            // 升级版本  1.0.0_RC1     1000081  后两位,81即为升级版本号,81-99
            versionName      : "1.0.0", // release正式
            debugVnName      : "", // debug开发模式 用于区分debug模式下上报的日志
            versionCode      : 100,
            //此版本号是SDK版本,不能随便改
            aar_version  : "1.0.0",
    ]

}