Commit b521b4fb authored by pengjunjign's avatar pengjunjign

add:添加可打包成aar的版本

parent 86c96460
......@@ -6,13 +6,13 @@ plugins {
android {
signingConfigs {
debug {
storeFile file('\\app\\test_key.jks')
storeFile file('\\test_key.jks')
storePassword 'test_key'
keyPassword 'test_key'
keyAlias 'test_key'
}
config {
storeFile file('C:/Android/workspace/pushplatformdemo/app/test_key.jks')
storeFile file('\\test_key.jks')
storePassword 'test_key'
keyPassword 'test_key'
keyAlias 'test_key'
......
您的密钥库包含 1 个条目
别名: test_key
创建日期: 2021-5-18
条目类型: PrivateKeyEntry
证书链长度: 1
证书[1]:
所有者: CN=test_key
发布者: CN=test_key
序列号: 43af9e16
生效时间: Tue May 18 15:26:59 CST 2021, 失效时间: Sat May 12 15:26:59 CST 2046
证书指纹:
SHA1: AD:29:C0:E9:34:F5:4A:72:37:8D:6B:EF:7A:79:DC:AE:79:15:65:15
SHA256: 8E:48:F2:B3:7B:42:6E:19:72:58:91:02:5F:0C:23:24:20:01:86:F4:22:69:3A:2C:C1:53:63:FB:22:15:D8:2A
签名算法名称: SHA256withRSA
主体公共密钥算法: 2048 位 RSA 密钥
版本: 3
扩展:
#1: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: D7 B4 FB 72 1F AD ED C0 A3 3E 31 6A C1 9D 6E 7E ...r.....>1j..n.
0010: 22 4F F4 8C "O..
]
]
\ No newline at end of file
......@@ -3,8 +3,9 @@ import java.text.SimpleDateFormat
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.5.0'
ext.kotlin_version = '1.3.72'
repositories {
jcenter()
google()
mavenCentral()
maven { url 'https://developer.huawei.com/repo/' }
......@@ -15,11 +16,14 @@ buildscript {
classpath 'com.huawei.agconnect:agcp:1.3.1.300'
classpath 'com.huawei.agconnect:agcp:1.4.2.300'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.15.2"
}
}
allprojects {
repositories {
jcenter()
google()
mavenCentral()
maven { url 'https://developer.huawei.com/repo/' }
......@@ -30,63 +34,63 @@ task clean(type: Delete) {
delete rootProject.buildDir
}
//推送模块目前使用的分支
String pushModuleCurrentBranch = "dev"
/**
* 导入推送模块,
* 如果push目录下为空(包含隐藏文件,.git文件),
* 则初始化子模块,拉取代码,切换到指定的分支
*/
task importPushModule() {
println("add submodule before")
File pushModuleFile = new File(getProjectDir().toString() + File.separatorChar + "push")
println("push module:" + pushModuleFile.toString())
//push目录下没有任何文件则视为没有初始化子模块
if (pushModuleFile.listFiles().length == 0) {
String cmd1 = "git submodule init".execute().text.trim()
String cmd2 = "git submodule update".execute().text.trim()
println(cmd1)
println(cmd2)
println("no init submodule , only init once in project")
}
//切换所有子仓库的分支,有网络操作,会增加编译耗时,项目第一次完整构建完后视情况自行注释
("git submodule foreach git checkout " + pushModuleCurrentBranch).execute()
if (!isToday()) {
println("execute:git submodule foreach git pull")
//拉取最新代码,有网络操作,会增加编译耗时,项目第一次完整构建完后视情况自行注释
"git submodule foreach git pull".execute()
}
println("git submodule foreach git branch".execute().text)
println("add submodule after")
}
/**
* @return 今天是否更新过代码
*/
boolean isToday() {
def result = false
File file = new File(getProjectDir().toString()
+ File.separatorChar + "app"
+ File.separatorChar + "build"
+ File.separatorChar + "lastPullSubmoduleDate.txt"
)
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd")
def today = dateFormat.format(new Date())
if (file.exists()) {
def lines = file.readLines()
if (lines.size() > 0) {
result = (lines.get(0) == today)
}
}
//刷新日期内容
file.delete()
file.createNewFile()
BufferedWriter fileWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, true), "UTF-8"));
fileWriter.write(today)
fileWriter.write("\n最后一次pull依赖仓库的时间,每日拉取一次")
fileWriter.flush()
fileWriter.close()
return result
}
\ No newline at end of file
////推送模块目前使用的分支
//String pushModuleCurrentBranch = "dev"
//
///**
// * 导入推送模块,
// * 如果push目录下为空(包含隐藏文件,.git文件),
// * 则初始化子模块,拉取代码,切换到指定的分支
// */
//task importPushModule() {
// println("add submodule before")
// File pushModuleFile = new File(getProjectDir().toString() + File.separatorChar + "push")
// println("push module:" + pushModuleFile.toString())
// //push目录下没有任何文件则视为没有初始化子模块
// if (pushModuleFile.listFiles().length == 0) {
// String cmd1 = "git submodule init".execute().text.trim()
// String cmd2 = "git submodule update".execute().text.trim()
// println(cmd1)
// println(cmd2)
// println("no init submodule , only init once in project")
// }
// //切换所有子仓库的分支,有网络操作,会增加编译耗时,项目第一次完整构建完后视情况自行注释
// ("git submodule foreach git checkout " + pushModuleCurrentBranch).execute()
// if (!isToday()) {
// println("execute:git submodule foreach git pull")
// //拉取最新代码,有网络操作,会增加编译耗时,项目第一次完整构建完后视情况自行注释
// "git submodule foreach git pull".execute()
// }
// println("git submodule foreach git branch".execute().text)
// println("add submodule after")
//
//}
//
///**
// * @return 今天是否更新过代码
// */
//boolean isToday() {
// def result = false
// File file = new File(getProjectDir().toString()
// + File.separatorChar + "app"
// + File.separatorChar + "build"
// + File.separatorChar + "lastPullSubmoduleDate.txt"
// )
// SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd")
// def today = dateFormat.format(new Date())
// if (file.exists()) {
// def lines = file.readLines()
// if (lines.size() > 0) {
// result = (lines.get(0) == today)
// }
// }
// //刷新日期内容
// file.delete()
// file.createNewFile()
// BufferedWriter fileWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, true), "UTF-8"));
// fileWriter.write(today)
// fileWriter.write("\n最后一次pull依赖仓库的时间,每日拉取一次")
// fileWriter.flush()
// fileWriter.close()
// return result
//}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment