diff --git a/.gitignore b/.gitignore
index 39fb081..2a42e3e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,20 @@
*.iml
.gradle
/local.properties
-/.idea/workspace.xml
+/.idea/caches
/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+/.idea/
+/.idea/misc.xml
.DS_Store
/build
/captures
.externalNativeBuild
+.cxx
+*.apk
+*.ap_
+*.dex
+*.class
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..0d15693
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ xmlns:android
+
+ ^$
+
+
+
+
+
+
+
+
+ xmlns:.*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*:id
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ .*:name
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ name
+
+ ^$
+
+
+
+
+
+
+
+
+ style
+
+ ^$
+
+
+
+
+
+
+
+
+ .*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*
+
+ http://schemas.android.com/apk/res/android
+
+
+ ANDROID_ATTRIBUTE_ORDER
+
+
+
+
+
+
+ .*
+
+ .*
+
+
+ BY_NAME
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 504a670..08809d1 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,11 +1,13 @@
+
+
-
+
@@ -18,6 +20,7 @@
+
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 095909e..6d07175 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -1,6 +1,9 @@
+
+
+
@@ -8,6 +11,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 9ac5bbb..360a949 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -2,47 +2,51 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 05348d0..0f2e166 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,13 +2,14 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 94a25f7..35eb1dd 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 433a6b1..9358faf 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,14 @@
# AndroidModuleDemo
-基于MVP搭建的组件化开发框架
+基于MVP搭建的组件化开发框架 ,[详细介绍](https://www.jianshu.com/p/00746e6fb48a)
# 效果图
-## 主要用于学习android组件化的学习,
+## 主要用于学习android组件化框架
## 封装了工作中常用的一些控件,基类等,可以做到快速开发
+
+
+~
diff --git a/app/build.gradle b/app/build.gradle
index 7ed3cdf..357bfc5 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,64 +1,142 @@
apply plugin: 'com.android.application'
+/**
+ * 打包时间
+ */
+static String releaseTime() {
+ return "\"" + new Date().format("yyyy-MM-dd HH:mm") + "\""
+}
+
+/**
+ * 根据build时间自动生成versionCode
+ */
+static def createVersionCode() {
+ def year = new Date().format("yy")
+ def month = new Date().format("MM")
+ def other = new Date().format("ddHHmm")
+ //年份-1 月份+12
+ year = year.toInteger() - 1
+ month = month.toInteger() + 12
+ def code = year.toString() + month.toString() + other
+ return code.toInteger();
+}
+
android {
compileSdkVersion rootProject.ext.versions.compileSdkVersion
buildToolsVersion rootProject.ext.versions.buildToolsVersion
defaultConfig {
- applicationId rootProject.ext.versions.applicationId
minSdkVersion rootProject.ext.versions.minSdkVersion
targetSdkVersion rootProject.ext.versions.targetSdkVersion
- versionCode rootProject.ext.versions.versionCode
- versionName rootProject.ext.versions.versionName
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- //MultiDex分包方法
- multiDexEnabled true
-
- //Arouter路由配置
- javaCompileOptions {
- annotationProcessorOptions {
- arguments = [moduleName: project.getName()]
- includeCompileClasspath = true
+
+ signingConfigs {
+ config {
+ keyAlias 'amd'
+ keyPassword '123456'
+ storeFile file('../key/amd.jsk')
+ storePassword '123456'
}
}
- }
- signingConfigs {
- config {
- keyAlias 'amd'
- keyPassword '123456'
- storeFile file('../key/amd.jsk')
- storePassword '123456'
+ defaultConfig {
+ minSdkVersion rootProject.ext.versions.minSdkVersion
+ targetSdkVersion rootProject.ext.versions.targetSdkVersion
+ versionCode createVersionCode()
+ multiDexEnabled true
+ signingConfig signingConfigs.config
+
+ ndk {
+ abiFilters "armeabi-v7a"
+ }
+
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = [AROUTER_MODULE_NAME: project.getName()]
+ includeCompileClasspath = true
+ }
+ }
}
+
}
+
buildTypes {
- debug {
- signingConfig signingConfigs.config
- }
release {
- signingConfig signingConfigs.config
+ lintOptions {
+ checkReleaseBuilds false
+ abortOnError false
+ }
+ //不使用混淆
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
-}
+ compileOptions {
+ targetCompatibility rootProject.ext.versions.javaSDKVersion
+ sourceCompatibility rootProject.ext.versions.javaSDKVersion
+ }
+
+ dexOptions {
+ javaMaxHeapSize "5g"
+ }
+ repositories {
+ flatDir {
+ dirs project(':common_base').file('libs')
+ }
+ }
+ //多维度标签
+ flavorDimensions "default"
+ //多渠道配置
+ productFlavors {
+ //开发
+ DEV {
+ dimension "default"
+ versionName rootProject.ext.versions.versionNameDEV
+ applicationId rootProject.ext.versions.applicationIdDEV
+ resValue "string", "app_name", "AMD_DEV"
+ buildConfigField("String", "RELEASE_TIME", releaseTime())
+ manifestPlaceholders = [
+ //7.0文件权限
+ FILE_PROVIDER: applicationId,
+ ]
+ }
+
+ //生产
+ PRO {
+ dimension "default"
+ versionName rootProject.ext.versions.versionName
+ applicationId rootProject.ext.versions.applicationId
+ resValue "string", "app_name", "AMD"
+ buildConfigField("String", "RELEASE_TIME", releaseTime())
+ manifestPlaceholders = [
+ //7.0文件权限
+ FILE_PROVIDER: applicationId,
+ ]
+ }
+ }
+ android.applicationVariants.all { variant ->
+ variant.outputs.all { output ->
+ outputFileName = "AMD_v${variant.versionName}_${variant.productFlavors[0].name}_${variant.buildType.name}.apk"
+ }
+ }
-configurations.all {
- resolutionStrategy.force 'com.android.support:support-annotations:27.1.1'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- annotationProcessor rootProject.ext.dependencies["butterknife_compiler"]
+ annotationProcessor rootProject.ext.dependencies["butterknifeCompiler"]
//公用依赖包
implementation project(':common_base')
if (!Boolean.valueOf(rootProject.ext.isModule)) {
+
//main模块
implementation project(':module_main')
+ //商城模块
implementation project(':module_market')
- implementation project(':module_wan_android')
+ //用户模块
implementation project(':module_user')
+ //玩Android模块
+ implementation project(':module_wan_android')
}
}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index d468f7e..55ada32 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -10,6 +10,16 @@
android:supportsRtl="true"
android:theme="@style/AdmTheme">
+
+
+
+
+
+
+
+
+
+ test page
+
+
+
+
+获取分辨率
+
+
+