Skip to content

Commit

Permalink
补充子模块测试代码
Browse files Browse the repository at this point in the history
  • Loading branch information
treech committed Aug 10, 2018
1 parent 834ecf1 commit 6aab8d8
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 30 deletions.
4 changes: 1 addition & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ android {
lintOptions {
abortOnError false
}
buildToolsVersion '26.0.2'
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//application crash report
compile 'ch.acra:acra:4.9.2'
//https://github.com/ACRA/acra/wiki/BasicSetup
//解决64K限制,方法数超过65535问题
compile 'com.android.support:multidex:1.0.1'
if (isModule.toBoolean()) {
Expand Down
17 changes: 0 additions & 17 deletions app/src/main/java/com/chinasofti/rcs/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,11 @@

import android.content.Context;
import android.support.multidex.MultiDex;

import com.alibaba.android.arouter.launcher.ARouter;
import com.chinasofti.common.base.BaseApplication;

import static com.chinasofti.common.base.AppConst.IS_DEBUG;

//@ReportsCrashes(
// mailTo = "[email protected]",
// mode = ReportingInteractionMode.DIALOG,
// customReportContent = {
// ReportField.APP_VERSION_NAME,
// ReportField.ANDROID_VERSION,
// ReportField.PHONE_MODEL,
// ReportField.CUSTOM_DATA,
// ReportField.BRAND,
// ReportField.STACK_TRACE,
// ReportField.LOGCAT,
// ReportField.USER_COMMENT},
// resToastText = R.string.crash_toast_text,
// resDialogText = R.string.crash_dialog_text,
// resDialogTitle = R.string.crash_dialog_title)
public class MainApplication extends BaseApplication {


Expand All @@ -36,7 +20,6 @@ public void onCreate() {
}
ARouter.init(this);
//崩溃日志记录初始化
// ACRA.initWindowFeature(this);
}


Expand Down
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.1'
//$localGradlePluginVersion是gradle.properties中的数据
classpath "com.android.tools.build:gradle:$localGradlePluginVersion"

Expand All @@ -27,6 +31,10 @@ allprojects {
mavenCentral()
//PersistentCookieJar needs
maven { url "https://jitpack.io" }
maven {
url 'https://maven.google.com/'
name 'Google'
}
}

}
Expand All @@ -53,7 +61,7 @@ ext {
retrofitVersion = "2.3.0"
cookieVersion = "v1.0.1"
butterknifeVersion = "8.2.1"
dagger2Version = "2.6"
dagger2Version = "2.13"
glideVersion = "3.7.0"
fastjsonVersion = "1.1.64.android"
greendaoVersion = "3.2.2"
Expand Down
5 changes: 2 additions & 3 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ apply plugin: 'com.android.library'
apply plugin: 'com.jakewharton.butterknife'
// greendao
apply plugin: 'org.greenrobot.greendao'
// dagger2
apply plugin: 'com.neenbedankt.android-apt'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
Expand Down Expand Up @@ -43,6 +41,7 @@ android {
abortOnError false
}

buildToolsVersion '26.0.2'
}

dependencies {
Expand All @@ -68,7 +67,7 @@ dependencies {
annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.butterknifeVersion"

//Dagger2
compile "com.google.dagger:dagger:$rootProject.dagger2Version"
annotationProcessor "com.google.dagger:dagger:$rootProject.dagger2Version"
annotationProcessor "com.google.dagger:dagger-compiler:$rootProject.dagger2Version"

//glide 可以其中网络请求改为okhttp
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.parallel=true
# 为自动化出包配置(因为每个开发的电脑坏境不一致)
localBuildToolsVersion=26.0.1
localBuildToolsVersion=26.0.2
# 这个值一般跟你的AndroidStudio版本号一致
localGradlePluginVersion=2.3.3

# 每次更改“isModule”的值后,需要点击 "Sync Project" 按钮
# isModule是“集成开发模式”和“组件开发模式”的切换开关
isModule=false
isModule=true
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Nov 02 17:31:04 GMT+08:00 2017
#Fri Aug 10 13:50:35 CST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.chinasofti.common.base.BaseActivity;
import com.chinasofti.common.base.BasePresenter;
import com.chinasofti.message.R;

public class MessageActivity extends BaseActivity {

Expand All @@ -17,6 +18,6 @@ protected BasePresenter createPresenter() {

@Override
protected int provideContentViewId() {
return 0;
return R.layout.activity_message_layout;
}
}
15 changes: 15 additions & 0 deletions module_message/src/main/res/layout/activity_message_layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center"
android:text="@string/mes_tv_show"
android:textSize="@dimen/size_70dp"></TextView>

</LinearLayout>

0 comments on commit 6aab8d8

Please sign in to comment.