Skip to content

Commit

Permalink
1.抽取工程通用配置,增加调试模式
Browse files Browse the repository at this point in the history
2.minSdkVersion降级到16
  • Loading branch information
WizzXu committed Jan 7, 2022
1 parent 1c02899 commit b75049d
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 107 deletions.
8 changes: 6 additions & 2 deletions CHANGE_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@

| 组件 | 最新版本 |
| --- | --- |
| io.github.wizzxu:fast-startup |0.0.2 |
| io.github.wizzxu:fast-startup-api |0.0.2 |
| io.github.wizzxu:fast-startup |0.0.5 |
| io.github.wizzxu:fast-startup-api |0.0.5 |
| io.github.wizzxu:fast-startup-transformer |0.0.1 |

# fast-startup
### 0.0.5
降级minSdkVersion至16
### 0.0.2
新增隐私初始化支持
新增依赖关系打印

# fast-startup-api
### 0.0.5
无内容变化
### 0.0.2
新增隐私初始化支持
35 changes: 2 additions & 33 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,11 @@ plugins {
id 'kotlin-android'
//id 'com.didiglobal.booster'
}
apply from: '../build-common.gradle'

android {
compileSdk 30

defaultConfig {
applicationId "io.github.fast.startup.demo"
minSdk 21
targetSdk 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

Expand All @@ -42,12 +17,6 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
//implementation project(path: ':fast-startup')
api "io.github.wizzxu:fast-startup:0.0.2"

//implementation "io.github.wizzxu:fast-startup:0.0.1-SNAPSHOT"
//implementation project(path: ':fast-startup-api')
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation "io.github.wizzxu:fast-startup:${rootProject.ext.fast_startup}"
}
14 changes: 7 additions & 7 deletions app/src/main/java/io/github/fast_startup/startup/demo/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@ class App : Application() {
).start()*/

// 测试环
//TestTask.addTask(TestCircle())
TestTask.addTask(TestCircle())
//
// //测试依缺失
//TestTask.addTask(TestMissing())
//
// //测试依赖接口方式
//TestTask.addTask(TestInterfaceImp())
TestTask.addTask(TestMissing())

//测试依赖接口方式
TestTask.addTask(TestInterfaceImp())
//
// //测试多次添加
//TestTask.addTask(TestMultiAdd())
TestTask.addTask(TestMultiAdd())

//TestTask.addTask(TestGetResult())
TestTask.addTask(TestGetResult())

//TestTask.addTask(TestAop())

Expand Down
38 changes: 38 additions & 0 deletions build-common.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
32 changes: 21 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.5.31"
ext.booster_version = '4.0.0'
ext.dokka_version = '1.5.30'
ext.fast_startup_transformer = '0.0.1'
ext {
kotlin_version = "1.5.31"
booster_version = '4.0.0'
dokka_version = '1.5.30'

fast_startup = '0.0.5'
fast_startup_api = '0.0.5'
fast_startup_transformer = '0.0.1'
}

configurations.all {
resolutionStrategy {
Expand All @@ -12,9 +17,8 @@ buildscript {
}
}
repositories {
maven {
url "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://s01.oss.sonatype.org/content/repositories/releases/" }
google()
mavenCentral()
}
Expand All @@ -30,19 +34,25 @@ buildscript {
}

allprojects {

configurations.all {
resolutionStrategy {
cacheChangingModulesFor 1, 'minutes'
cacheDynamicVersionsFor 1, 'minutes'
}
}
if ("true" == rootProject.isDebugModule) {
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute module("io.github.wizzxu:fast-startup-api") using project(":fast-startup-api")
substitute module("io.github.wizzxu:fast-startup") using project(":fast-startup")
}
}
}
repositories {
google()
mavenCentral()
maven {
url "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}
maven { url "https://s01.oss.sonatype.org/content/repositories/iogithubwizzxu-1018/" }
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
jcenter() // Warning: this repository is going to shut down soon
}
}
Expand Down
26 changes: 1 addition & 25 deletions fast-startup-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,13 @@ plugins {
}

apply from: 'publish.gradle'
apply from: '../build-common.gradle'

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {

//implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
2 changes: 1 addition & 1 deletion fast-startup-api/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ task androidSourcesJar(type: Jar) {
ext {
PUBLISH_GROUP_ID = 'io.github.wizzxu'
PUBLISH_ARTIFACT_ID = 'fast-startup-api'
PUBLISH_VERSION = '0.0.2'
PUBLISH_VERSION = '0.0.5'
}

// leave them empty to allow compilation
Expand Down
28 changes: 2 additions & 26 deletions fast-startup/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,19 @@ plugins {
}

apply from: 'publish.gradle'

apply from: '../build-common.gradle'
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
//api project(path: ':fast-startup-api')
//api "io.github.wizzxu:fast-startup-api:0.0.1-SNAPSHOT"
api "io.github.wizzxu:fast-startup-api:0.0.2"
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
api "io.github.wizzxu:fast-startup-api:${rootProject.ext.fast_startup_api}"
}
2 changes: 1 addition & 1 deletion fast-startup/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ task androidSourcesJar(type: Jar) {
ext {
PUBLISH_GROUP_ID = 'io.github.wizzxu'
PUBLISH_ARTIFACT_ID = 'fast-startup'
PUBLISH_VERSION = '0.0.2'
PUBLISH_VERSION = '0.0.5'
}

// leave them empty to allow compilation
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
kotlin.code.style=official

# 是否是调试模式
isDebugModule=false

0 comments on commit b75049d

Please sign in to comment.