-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
715c7ce
commit a139bf3
Showing
17 changed files
with
107 additions
and
202 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,41 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
|
||
buildscript { | ||
def moduleConfigProps = new Properties() | ||
File moduleConfig = rootProject.file("moduleConfig.properties") | ||
if (moduleConfig.exists()) { | ||
moduleConfigProps.load(new FileInputStream(moduleConfig)) | ||
} | ||
def localMavenDir = file(moduleConfigProps.localMavenPath) | ||
|
||
ext.kotlin_version = '1.4.31' | ||
|
||
ext.shadow_version = '2.0.15' | ||
apply from: "${gradle.ext.localGradleDir}/settings/deps.gradle" | ||
|
||
repositories { | ||
maven { url "file://${localMavenDir.absolutePath}" } | ||
maven { url "file://${gradle.ext.localMavenDir.absolutePath}" } | ||
google() | ||
mavenCentral() | ||
maven { url "https://jitpack.io" } | ||
|
||
maven { url "https://plugins.gradle.org/m2/" } | ||
google() | ||
jcenter() | ||
maven { url "https://repo1.maven.org/maven2/" } | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:4.1.2' | ||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
classpath 'com.android.tools.build:gradle:7.0.0' | ||
classpath classpath.kotlin | ||
classpath classpath.component_router | ||
classpath classpath.bugly | ||
classpath classpath.analysis | ||
classpath classpath.upload | ||
} | ||
} | ||
|
||
def moduleConfigProps = new Properties() | ||
File moduleConfig = rootProject.file("moduleConfig.properties") | ||
if (moduleConfig.exists()) { | ||
moduleConfigProps.load(new FileInputStream(moduleConfig)) | ||
} | ||
def localMavenDir = file(moduleConfigProps.localMavenPath) | ||
def localGradleDir = file(moduleConfigProps.localGradlePath) | ||
|
||
allprojects { | ||
|
||
repositories { | ||
maven { url "file://${localMavenDir.absolutePath}" } | ||
maven { url "file://${gradle.ext.localMavenDir.absolutePath}" } | ||
|
||
google() | ||
jcenter() | ||
mavenLocal() | ||
mavenCentral() | ||
maven { url "https://jitpack.io" } | ||
|
||
maven { url "https://plugins.gradle.org/m2/" } | ||
maven { url "https://repo1.maven.org/maven2/" } | ||
|
||
maven { url "https://oss.sonatype.org/content/repositories/snapshots" } // for org-java | ||
} | ||
} | ||
|
||
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
} | ||
|
||
apply from: "${localGradleDir}/deps.gradle" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
def loadProperties(filename) { | ||
Properties properties = new Properties() | ||
|
||
def file = new File(settingsDir, filename) | ||
|
||
if (file.exists()) { | ||
properties.load(file.newDataInputStream()) | ||
} else { | ||
logger.warn("Properties file ${file} does not exist") | ||
} | ||
|
||
return properties | ||
} | ||
|
||
gradle.ext.appProperties = loadProperties('app.properties') | ||
gradle.ext.moduleConfig = loadProperties('moduleConfig.properties') | ||
gradle.ext.localMavenDir = file(gradle.ext.moduleConfig.localMavenPath) | ||
gradle.ext.localGradleDir = file(gradle.ext.moduleConfig.localGradlePath) | ||
|
||
|
||
// 引入composing的设置 | ||
apply from: "gradle/composingConfig.gradle" | ||
// 遍历composing_dependencies中的所有配置 | ||
ext.getProperty("composing_dependencies").each { projectConfig -> | ||
def isLocal = projectConfig["isLocal"] | ||
def projectPath = projectConfig["projectPath"] | ||
def projectMaven = projectConfig["projectMaven"] | ||
def projectName = projectConfig["projectName"] | ||
// 如果是本地依赖 | ||
if (isLocal) { | ||
// 使用本地依赖进行替换 | ||
includeBuild(projectPath) { | ||
dependencySubstitution { | ||
substitute module(projectMaven) with project(projectName) | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'kotlin-android-extensions' | ||
apply plugin: 'kotlin-kapt' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
|
||
defaultConfig { | ||
minSdkVersion 21 | ||
targetSdkVersion 29 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' | ||
vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] | ||
|
||
javaCompileOptions { | ||
annotationProcessorOptions { | ||
arguments = [ | ||
"moduleName" : project.getName(), | ||
"HOST" : project.getName().replace("-", ""), | ||
"RouterDocFolder": "${project.rootDir}/RouterDocument".toString(), | ||
"RouterDocEnable": String.valueOf("true") | ||
] | ||
} | ||
} | ||
} | ||
|
||
buildTypes { | ||
debug { | ||
buildConfigField "boolean", "LOG_DEBUG", "true" | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', file(rootProject.ext.android["globalProguardFilesPath"]) | ||
} | ||
|
||
release { | ||
buildConfigField "boolean", "LOG_DEBUG", "false" | ||
zipAlignEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', file(rootProject.ext.android["globalProguardFilesPath"]) | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
lintOptions { | ||
disable 'MissingTranslation' | ||
disable 'ExtraTranslation' | ||
disable 'BlockedPrivateApi' | ||
} | ||
|
||
dexOptions { | ||
jumboMode = true | ||
} | ||
|
||
useLibrary 'org.apache.http.legacy' | ||
} | ||
|
||
|
||
dependencies { | ||
kapt rootProject.ext.dependencies["dagger2-compiler"] | ||
kapt rootProject.ext.dependencies["router-compiler"] | ||
|
||
api rootProject.ext.dependencies["kotlin-stdlib"] | ||
} | ||
apply from: "${gradle.ext.localGradleDir}/library/header.gradle" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1 @@ | ||
def moduleConfigProps = new Properties() | ||
File moduleConfig = rootProject.file("moduleConfig.properties") | ||
if (moduleConfig.exists()) { | ||
moduleConfigProps.load(new FileInputStream(moduleConfig)) | ||
} | ||
|
||
def localMavenDir = new File(rootDir, moduleConfigProps.localMavenPath) | ||
def localGradleDir = new File(rootDir, moduleConfigProps.localGradlePath) | ||
def localLibraryGradleDir = new File(localGradleDir, "library") | ||
if (localLibraryGradleDir.exists()) { | ||
FilenameFilter filter = { dir, filename -> filename.endsWith(".gradle") } | ||
def gradleFiles = localLibraryGradleDir.listFiles filter | ||
gradleFiles.each { file -> | ||
apply from: "file://${file.absolutePath}" | ||
} | ||
} | ||
apply from: "${gradle.ext.localGradleDir}/library/footer.gradle" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Fri Jun 25 20:58:55 CST 2021 | ||
#Sat Mar 13 10:38:09 CST 2021 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# 本地 maven 的路径 | ||
localMavenPath=/Users/zby/Documents/GitHub/mempool/TimeCatMaven | ||
localMavenPath=/Users/zby/Documents/timecat/mempool/TimeCatMaven | ||
# 本地 gradle 的路径 | ||
localGradlePath=/Users/zby/Documents/GitHub/mempool/TimeCatGradle | ||
localGradlePath=/Users/zby/Documents/timecat/mempool/TimeCatGradle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,21 @@ | ||
apply plugin: 'com.android.application' | ||
apply from: "${gradle.ext.localGradleDir}/project/plugin_header.gradle" | ||
|
||
android { | ||
compileSdkVersion 29 | ||
defaultConfig { | ||
applicationId "com.tencent.shadow.sample.plugin" | ||
minSdkVersion 21 | ||
targetSdkVersion 28 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
|
||
signingConfig signingConfigs.create("release") | ||
signingConfig.initWith(buildTypes.debug.signingConfig) | ||
} | ||
} | ||
packagingOptions { | ||
exclude 'META-INF/DEPENDENCIES' | ||
exclude 'META-INF/rxjava.properties' | ||
} | ||
} | ||
|
||
dependencies { | ||
api project(':plugin-main-lib') | ||
// implementation 'androidx.appcompat:appcompat:1.0.2' | ||
// implementation 'com.tencent:mmkv:1.0.16' | ||
// | ||
// def retrofitSdkVersion = "2.6.0" | ||
// implementation "com.squareup.retrofit2:retrofit:$retrofitSdkVersion" | ||
// implementation "com.squareup.retrofit2:converter-gson:$retrofitSdkVersion" | ||
// implementation "com.squareup.retrofit2:adapter-rxjava:$retrofitSdkVersion" | ||
// implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitSdkVersion" | ||
// implementation "com.squareup.okhttp3:okhttp:3.10.0" | ||
// implementation "io.reactivex.rxjava2:rxandroid:2.0.1" | ||
implementation 'androidx.appcompat:appcompat:1.0.2' | ||
implementation 'com.tencent:mmkv:1.0.16' | ||
|
||
def retrofitSdkVersion = "2.6.0" | ||
implementation "com.squareup.retrofit2:retrofit:$retrofitSdkVersion" | ||
implementation "com.squareup.retrofit2:converter-gson:$retrofitSdkVersion" | ||
implementation "com.squareup.retrofit2:adapter-rxjava:$retrofitSdkVersion" | ||
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitSdkVersion" | ||
implementation "com.squareup.okhttp3:okhttp:3.10.0" | ||
implementation "io.reactivex.rxjava2:rxandroid:2.0.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.