Compare commits
1 Commits
master
...
screen_fli
| Author | SHA1 | Date | |
|---|---|---|---|
| 10d0dabdfc |
168
build.gradle
168
build.gradle
@@ -2,6 +2,14 @@ buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url 'https://maven.google.com' }
|
||||
maven { url 'https://developer.huawei.com/repo/' }
|
||||
maven { url 'https://developer.hihonor.com/repo' }
|
||||
maven { url 'https://maven.aliyun.com/repository/central' }
|
||||
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||
}
|
||||
dependencies {
|
||||
classpath GRADLE_CLASS_PATH
|
||||
@@ -10,6 +18,31 @@ buildscript {
|
||||
}
|
||||
|
||||
allprojects {
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
force 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
force 'androidx.core:core:1.5.0'
|
||||
|
||||
//for targetSdkVersion 29
|
||||
force 'androidx.activity:activity:1.2.2'
|
||||
force 'androidx.lifecycle:lifecycle-livedata:2.3.1'
|
||||
force 'androidx.lifecycle:lifecycle-livedata-core:2.3.1'
|
||||
force 'androidx.lifecycle:lifecycle-runtime:2.3.1'
|
||||
force 'androidx.lifecycle:lifecycle-viewmodel:2.3.1'
|
||||
force 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1'
|
||||
force 'androidx.lifecycle:lifecycle-service:2.3.1'
|
||||
force 'androidx.lifecycle:lifecycle-process:2.3.1'
|
||||
force 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
|
||||
force 'androidx.savedstate:savedstate:1.1.0'
|
||||
force 'androidx.profileinstaller:profileinstaller:1.1.0'
|
||||
force 'androidx.startup:startup-runtime:1.0.0'
|
||||
force 'androidx.arch.core:core-runtime:2.1.0'
|
||||
force 'androidx.sqlite:sqlite:2.1.0'
|
||||
force 'androidx.sqlite:sqlite-framework:2.1.0'
|
||||
force 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
|
||||
}
|
||||
}
|
||||
|
||||
gradle.projectsEvaluated {
|
||||
tasks.withType(JavaCompile) {
|
||||
options.compilerArgs.add('-Xbootclasspath/p:libs/framework.jar')
|
||||
@@ -32,24 +65,7 @@ apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.google.protobuf'
|
||||
|
||||
android {
|
||||
gradle.projectsEvaluated {
|
||||
tasks.withType(JavaCompile) {
|
||||
Set<File> fileSet = options.bootstrapClasspath.getFiles()
|
||||
List<File> newFileList = new ArrayList<>();
|
||||
//JAVA语法,可连续调用,输入参数建议为相对路径
|
||||
newFileList.add(new File("libs/framework.jar"))
|
||||
//最后将原始参数添加
|
||||
newFileList.addAll(fileSet)
|
||||
options.bootstrapClasspath = files(
|
||||
newFileList.toArray()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
abortOnError false
|
||||
}
|
||||
namespace "com.aoleyun.os"
|
||||
|
||||
compileSdkVersion COMPILE_SDK
|
||||
buildToolsVersion BUILD_TOOLS_VERSION
|
||||
@@ -57,13 +73,20 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 28
|
||||
versionCode 6
|
||||
versionName "1.5"
|
||||
versionCode 216
|
||||
versionName "1.6.1016"
|
||||
|
||||
ndk {
|
||||
//选择要添加的对应 cpu 类型的 .so 库。
|
||||
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
manifestPlaceholders = [
|
||||
JPUSH_PKGNAME: "com.aoleyun.os",
|
||||
JPUSH_APPKEY : "0c7ba5a1622dba78d5bd00cc", //JPush 上注册的包名对应的 Appkey.
|
||||
@@ -73,7 +96,19 @@ android {
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
//签名
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
dataBinding true
|
||||
buildConfig true
|
||||
aidl true
|
||||
}
|
||||
|
||||
//签名
|
||||
signingConfigs {
|
||||
zhanRui {
|
||||
storeFile file("src/doc/zhanxun.keystore")
|
||||
@@ -84,7 +119,7 @@ android {
|
||||
v2SigningEnabled true
|
||||
}
|
||||
|
||||
debug {
|
||||
mtk {
|
||||
storeFile file("src/doc/xueshibaoos.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "xueshibaoos"
|
||||
@@ -92,12 +127,13 @@ android {
|
||||
v2SigningEnabled false
|
||||
}
|
||||
|
||||
release {// 签名文件
|
||||
storeFile file("src/doc/xueshibaoos.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "xueshibaoos"
|
||||
keyPassword "123456"
|
||||
v2SigningEnabled false
|
||||
SM8150 {
|
||||
storeFile file("src/doc/sm8150.jks")
|
||||
storePassword "logan-123456789"
|
||||
keyAlias "platformkey"
|
||||
keyPassword "logan-123456789"
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,50 +154,28 @@ android {
|
||||
|
||||
debug {
|
||||
buildConfigField "String", "platform", '"MTK"'
|
||||
versionNameSuffix "-debug"
|
||||
versionNameSuffix "_debug"
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
//Zipalign优化
|
||||
zipAlignEnabled true
|
||||
signingConfig signingConfigs.debug
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
def outputFile = output.outputFile
|
||||
if (outputFile != null) {
|
||||
def fileName = "${appName()}-${variant.versionCode}-V${variant.versionName}-${releaseTime()}-${buildType.name}.apk"
|
||||
output.outputFileName = fileName
|
||||
}
|
||||
}
|
||||
}
|
||||
signingConfig signingConfigs.SM8150
|
||||
}
|
||||
|
||||
release {
|
||||
buildConfigField "String", "platform", '"MTK"'
|
||||
//混淆
|
||||
minifyEnabled false
|
||||
//前一部分代表系统默认的android程序的混淆文件,该文件已经包含了基本的混淆声明,后一个文件是自己的定义混淆文件
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
//Zipalign优化
|
||||
zipAlignEnabled true
|
||||
//签名
|
||||
signingConfig signingConfigs.release
|
||||
//将release版本的包名重命名,加上版本及日期
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
def outputFile = ""
|
||||
if (outputFile != null) {
|
||||
def fileName = "${appName()}-${variant.versionCode}-V${variant.versionName}-${releaseTime()}-${buildType.name}.apk"
|
||||
output.outputFileName = fileName
|
||||
}
|
||||
}
|
||||
}
|
||||
signingConfig signingConfigs.SM8150
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.outputs.all { output -> // 改为 all
|
||||
def buildType = variant.buildType.name
|
||||
if (buildType.contains("debug")) {
|
||||
outputFileName = "${appName()}_V${defaultConfig.versionName}_${releaseTime()}.apk"
|
||||
} else {
|
||||
outputFileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${buildType}.apk"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The flavor dimensions for build variants (e.g. aospWithQuickstep, aospWithoutQuickstep)
|
||||
@@ -312,8 +326,8 @@ dependencies {
|
||||
//mmkv
|
||||
implementation 'com.tencent:mmkv-static:1.2.10'
|
||||
//极光推送
|
||||
implementation 'cn.jiguang.sdk:jpush:3.8.6' // 此处以JPush 3.8.6 版本为例。
|
||||
implementation 'cn.jiguang.sdk:jcore:2.6.0' // 此处以JCore 2.6.0 版本为例。
|
||||
implementation 'cn.jiguang.sdk:jpush:3.8.5' // 此处以JPush 3.8.6 版本为例。
|
||||
implementation 'cn.jiguang.sdk:jcore:2.7.8' // 此处以JCore 2.6.0 版本为例。
|
||||
//下载
|
||||
implementation 'me.laoyuyu.aria:core:3.8.16'
|
||||
annotationProcessor 'me.laoyuyu.aria:compiler:3.8.16'
|
||||
@@ -321,26 +335,14 @@ dependencies {
|
||||
implementation 'com.blankj:utilcodex:1.30.6'
|
||||
}
|
||||
|
||||
preBuild {
|
||||
doLast {
|
||||
def imlFile = file(project.name + ".iml")
|
||||
println 'Change ' + project.name + '.iml order'
|
||||
try {
|
||||
def parsedXml = (new XmlParser()).parse(imlFile)
|
||||
def jdkNode = parsedXml.component[1].orderEntry.find { it.'@type' == 'jdk' }
|
||||
parsedXml.component[1].remove(jdkNode)
|
||||
def sdkString = "Android API " + android.compileSdkVersion.substring("android-".length()) + " Platform"
|
||||
println 'what' + sdkString
|
||||
new Node(parsedXml.component[1], 'orderEntry', ['type': 'jdk', 'jdkName': sdkString, 'jdkType': 'Android SDK'])
|
||||
groovy.xml.XmlUtil.serialize(parsedXml, new FileOutputStream(imlFile))
|
||||
} catch (FileNotFoundException e) {
|
||||
// nop, iml not found
|
||||
println "no iml found"
|
||||
}
|
||||
// 在 dependencies 之后添加
|
||||
project.afterEvaluate {
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.javaCompileProvider.get().options.bootstrapClasspath = files(
|
||||
file('libs/framework.jar'),
|
||||
android.getBootClasspath()
|
||||
)
|
||||
}
|
||||
//https://www.pianshen.com/article/93481144911/
|
||||
//https://blog.csdn.net/dhl_1986/article/details/102856026
|
||||
//使用系统编译后的framework.jar
|
||||
}
|
||||
|
||||
protobuf {
|
||||
|
||||
@@ -4,10 +4,10 @@ android.enableJetifier = true
|
||||
|
||||
ANDROID_X_VERSION=1.0.0-beta01
|
||||
|
||||
GRADLE_CLASS_PATH=com.android.tools.build:gradle:3.3.0
|
||||
GRADLE_CLASS_PATH=com.android.tools.build:gradle:8.13.2
|
||||
|
||||
PROTOBUF_CLASS_PATH=com.google.protobuf:protobuf-gradle-plugin:0.8.8
|
||||
PROTOBUF_CLASS_PATH=com.google.protobuf:protobuf-gradle-plugin:0.9.4
|
||||
PROTOBUF_DEPENDENCY=com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7
|
||||
|
||||
BUILD_TOOLS_VERSION=28.0.3
|
||||
BUILD_TOOLS_VERSION=36.0.0
|
||||
COMPILE_SDK=android-29
|
||||
@@ -1,6 +1,8 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
namespace "com.aoleyun.os.icons"
|
||||
|
||||
compileSdkVersion COMPILE_SDK
|
||||
buildToolsVersion BUILD_TOOLS_VERSION
|
||||
publishNonDefault true
|
||||
|
||||
BIN
src/doc/sm8150.jks
Normal file
BIN
src/doc/sm8150.jks
Normal file
Binary file not shown.
Reference in New Issue
Block a user