加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 2.82 KB
一键复制 编辑 原始数据 按行查看 历史
咔一下 提交于 2023-09-22 18:34 . skydroid
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = '1.6.10'
play_services_version = '9.4.0'
support_lib_version = '23.4.0'
okhttp_version = '2.5.0'
android_build_sdk_version = 23
android_build_tools_version = '23.0.3'
android_build_target_sdk_version = 22
android_build_min_sdk_version = 21
}
repositories {
google()
maven { url 'https://maven.aliyun.com/repository/public'}
maven { url 'https://maven.aliyun.com/repository/jcenter'}
maven { url "https://maven.aliyun.com/repository/releases" }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/releases'}
maven { url "https://www.jitpack.io" }
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'io.fabric.tools:gradle:1.28.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
//Dexcount gradle plugin
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.4.4'
}
}
def getMavenUsername(){
return hasProperty('COM_O3DR_MAVEN_USERNAME') ? COM_O3DR_MAVEN_USERNAME : ''
}
def getMavenApiKey(){
return hasProperty('COM_O3DR_MAVEN_APIKEY') ? COM_O3DR_MAVEN_APIKEY : ''
}
def getMavenRepoUrl(){
return hasProperty('COM_O3DR_MAVEN_REPO_URL') ? COM_O3DR_MAVEN_REPO_URL :
'https://dl.bintray.com/3d-robotics/maven'
}
def computeVersionCode(int versionMajor, int versionMinor, int versionPatch, int versionBuild = 0){
return versionMajor * 100000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
}
def generateVersionName(String versionPrefix, int versionMajor, int versionMinor, int versionPatch, String versionSuffix = ""){
def versionName = "${versionPrefix}${versionMajor}.${versionMinor}.${versionPatch}"
if(versionSuffix != null && !versionSuffix.isEmpty() && versionSuffix != "release"){
versionName += "-${versionSuffix}"
}
return versionName
}
allprojects {
repositories {
google()
maven { url 'https://maven.aliyun.com/repository/public'}
maven { url 'https://maven.aliyun.com/repository/jcenter'}
maven { url "https://maven.aliyun.com/repository/releases" }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/releases'}
maven { url "https://www.jitpack.io" }
mavenCentral()
maven {
url getMavenRepoUrl()
credentials {
username getMavenUsername()
password getMavenApiKey()
}
}
maven { url 'https://maven.fabric.io/public' }
flatDir {
dirs 'libs'
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化