1 Star 0 Fork 1

dengyisheng/Bluetooth

forked from ly54561501/Bluetooth 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.gradle 3.51 KB
一键复制 编辑 原始数据 按行查看 历史
ly54561501 提交于 2018-05-27 10:36 . first commit
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
//task clean(type: Delete) {
// delete rootProject.buildDir
//}
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.1'
defaultConfig {
applicationId "com.actions.bluetoothbox2"
minSdkVersion 14
targetSdkVersion 22
versionName "1.0.0"
// setProperty("archivesBaseName", "BluetoothBox_v${versionName}_${releaseTime()}")
versionCode 1
}
signingConfigs {
release
}
buildTypes {
debug {
minifyEnabled false
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
if (useLocalSource == '1') {
println 'Using local source code'
// debugCompile project(path: ':ibluz', configuration: 'ibluzDebug') //
// releaseCompile project(path: ':ibluz', configuration: 'ibluzRelease') //
} else {
compile 'com.actions:ibluz:1.0.4'
}
// compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.android.support:support-v4:25.0.1'
testCompile 'junit:junit:4.12'
compile files('libs/ibluz 1.1.4.jar')
implementation project(':sm')
}
def File propFile = file('signing.properties');
if (propFile.exists()) {
def Properties props = new Properties()
props.load(new FileInputStream(propFile))
if (props != null
&& props.containsKey('STORE_FILE') && props.containsKey('STORE_PASSWORD') &&
props.containsKey('KEY_ALIAS') && props.containsKey('KEY_PASSWORD')) {
def keystoreFile = file(props["STORE_FILE"])
if (keystoreFile.canRead()) {
android.signingConfigs.release.storeFile = keystoreFile
android.signingConfigs.release.storePassword = props['STORE_PASSWORD']
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
android.signingConfigs.release.keyPassword = props['KEY_PASSWORD']
} else {
println("keystore file not found: " + props["KEYSTORE_FILE"])
android.buildTypes.release.signingConfig = null
}
} else {
println("signing.properties found but some entries missing")
android.buildTypes.release.signingConfig = null
}
} else {
println("signing.properties not found ")
android.buildTypes.release.signingConfig = null
}
//def gitSha() {
// return 'git rev-parse --short HEAD'.execute().text.trim().substring(0,4)
//}
def releaseTime() {
return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
}
def gitCommitCount() {
try {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', '--count', 'HEAD'
standardOutput = stdout
}
def commitCount = stdout.toString().trim().toInteger()
return commitCount
}
catch (ignored) {
return 0
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dengyisheng/Bluetooth.git
git@gitee.com:dengyisheng/Bluetooth.git
dengyisheng
Bluetooth
Bluetooth
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385