Commit 70825bc8 by wangtao

feat:添加各个lib工程

parent ee41da8c
......@@ -9,6 +9,14 @@
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/lib_app_credit" />
<option value="$PROJECT_DIR$/lib_app_home" />
<option value="$PROJECT_DIR$/lib_app_login" />
<option value="$PROJECT_DIR$/lib_app_passport" />
<option value="$PROJECT_DIR$/lib_app_plan_trip" />
<option value="$PROJECT_DIR$/lib_common" />
<option value="$PROJECT_DIR$/lib_core" />
<option value="$PROJECT_DIR$/lib_ui" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
......
......@@ -3,31 +3,35 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
compileSdkVersion build_config.compile_sdk
buildToolsVersion build_config.build_tool
defaultConfig {
applicationId "info.hook.com.moduleproject"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
minSdkVersion build_config.min_sdk
targetSdkVersion build_config.target_sdk
versionCode build_config.version_code
versionName build_config.version_name
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.30"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation deps.app_compat
testImplementation deps.junit
androidTestImplementation deps.runner
androidTestImplementation deps.espresso
}
......@@ -2,20 +2,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="info.hook.com.moduleproject">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: 'config.gradle'
buildscript {
apply from: 'system_config.gradle'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.30"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:1.3.30"
classpath build_config.classpath_gradle
classpath build_config.classpath_kotlin
}
}
......@@ -25,6 +25,9 @@ task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
kotlin_version = '1.3.30'
}
\ No newline at end of file
task test {
println "====$build_config.classpath_gradle ===="
println "====$build_config.classpath_kotlin ===="
println "====$build_config.classpath_kotlin_extensions ===="
}
......@@ -8,5 +8,6 @@ def build_module_credit = 0x05//信用模块组件
def build_module_passport = 0x06//通行证组件
def build_module_plan_trip = 0x07//预约出行组件
//当前运行的model
ext.build_module_app = build_module_app
apply plugin: 'com.android.library'
android {
compileSdkVersion build_config.compile_sdk
buildToolsVersion build_config.build_tool
defaultConfig {
minSdkVersion build_config.min_sdk
targetSdkVersion build_config.target_sdk
versionCode build_config.version_code
versionName build_config.version_name
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.app_compat
testImplementation deps.junit
androidTestImplementation deps.runner
androidTestImplementation deps.espresso
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package flutter.com.lib_ui;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("flutter.com.lib_ui.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="flutter.com.lib_ui" />
<resources>
<string name="app_name">lib_core</string>
</resources>
package flutter.com.lib_ui;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
apply plugin: 'com.android.library'
android {
compileSdkVersion build_config.compile_sdk
buildToolsVersion build_config.build_tool
defaultConfig {
minSdkVersion build_config.min_sdk
targetSdkVersion build_config.target_sdk
versionCode build_config.version_code
versionName build_config.version_name
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.app_compat
testImplementation deps.junit
androidTestImplementation deps.runner
androidTestImplementation deps.espresso
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package flutter.com.lib_ui;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("flutter.com.lib_ui.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="flutter.com.lib_ui" />
<resources>
<string name="app_name">lib_core</string>
</resources>
package flutter.com.lib_ui;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
apply plugin: 'com.android.library'
android {
compileSdkVersion build_config.compile_sdk
buildToolsVersion build_config.build_tool
defaultConfig {
minSdkVersion build_config.min_sdk
targetSdkVersion build_config.target_sdk
versionCode build_config.version_code
versionName build_config.version_name
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.app_compat
testImplementation deps.junit
androidTestImplementation deps.runner
androidTestImplementation deps.espresso
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package flutter.com.lib_ui;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("flutter.com.lib_ui.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="flutter.com.lib_ui" />
<resources>
<string name="app_name">lib_core</string>
</resources>
package flutter.com.lib_ui;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
apply plugin: 'com.android.library'
android {
compileSdkVersion build_config.compile_sdk
buildToolsVersion build_config.build_tool
defaultConfig {
minSdkVersion build_config.min_sdk
targetSdkVersion build_config.target_sdk
versionCode build_config.version_code
versionName build_config.version_name
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.app_compat
testImplementation deps.junit
androidTestImplementation deps.runner
androidTestImplementation deps.espresso
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package flutter.com.lib_ui;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("flutter.com.lib_ui.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="flutter.com.lib_ui" />
<resources>
<string name="app_name">lib_core</string>
</resources>
package flutter.com.lib_ui;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
apply plugin: 'com.android.library'
android {
compileSdkVersion build_config.compile_sdk
buildToolsVersion build_config.build_tool
defaultConfig {
minSdkVersion build_config.min_sdk
targetSdkVersion build_config.target_sdk
versionCode build_config.version_code
versionName build_config.version_name
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.app_compat
testImplementation deps.junit
androidTestImplementation deps.runner
androidTestImplementation deps.espresso
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package flutter.com.lib_ui;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("flutter.com.lib_ui.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="flutter.com.lib_ui" />
<resources>
<string name="app_name">lib_core</string>
</resources>
package flutter.com.lib_ui;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
apply plugin: 'com.android.library'
android {
compileSdkVersion build_config.compile_sdk
buildToolsVersion build_config.build_tool
defaultConfig {
minSdkVersion build_config.min_sdk
targetSdkVersion build_config.target_sdk
versionCode build_config.version_code
versionName build_config.version_name
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.app_compat
testImplementation deps.junit
androidTestImplementation deps.runner
androidTestImplementation deps.espresso
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package flutter.com.lib_ui;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("flutter.com.lib_ui.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="flutter.com.lib_ui" />
<resources>
<string name="app_name">lib_core</string>
</resources>
package flutter.com.lib_ui;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
apply plugin: 'com.android.library'
android {
compileSdkVersion build_config.compile_sdk
buildToolsVersion build_config.build_tool
defaultConfig {
minSdkVersion build_config.min_sdk
targetSdkVersion build_config.target_sdk
versionCode build_config.version_code
versionName build_config.version_name
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.app_compat
testImplementation deps.junit
androidTestImplementation deps.runner
androidTestImplementation deps.espresso
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package flutter.com.lib_ui;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("flutter.com.lib_ui.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="flutter.com.lib_ui" />
<resources>
<string name="app_name">lib_core</string>
</resources>
package flutter.com.lib_ui;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
apply plugin: 'com.android.library'
android {
compileSdkVersion build_config.compile_sdk
buildToolsVersion build_config.build_tool
defaultConfig {
minSdkVersion build_config.min_sdk
targetSdkVersion build_config.target_sdk
versionCode build_config.version_code
versionName build_config.version_name
javaCompileOptions {
annotationProcessorOptions {
arguments = [AROUTER_MODULE_NAME: project.getName()]
}
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.app_compat
testImplementation deps.junit
androidTestImplementation deps.runner
androidTestImplementation deps.espresso
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package flutter.com.lib_ui;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("flutter.com.lib_ui.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="flutter.com.lib_ui" />
<resources>
<string name="app_name">lib_ui</string>
</resources>
package flutter.com.lib_ui;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
include ':app'
include ':app', ':lib_ui', ':lib_core', ':lib_common', ':lib_app_passport', ':lib_app_login',":lib_app_plan_trip",":lib_app_home",":lib_app_credit"
apply from: 'change_config.gradle'
//build_config 配置
def build_config = [:]
//android
build_config.classpath_gradle = "com.android.tools.build:gradle:3.1.2"
//kotlin
build_config.min_sdk = 19
build_config.compile_sdk = 26
build_config.build_tool = "27.0.3"
build_config.target_sdk = 26
build_config.version_code = 7
build_config.version_name = "1.2.0"
build_config.classpath_kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.41"
build_config.classpath_kotlin_extension = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.41"
ext.build_config = build_config
//应用包版本
def versions = [:]
//google
versions.support = "27.1.1"
versions.multidex = "1.0.2"
versions.constraint = "1.1.2"
versions.kotlin = "1.2.41"
versions.dagger = "2.16"
versions.arch = "1.1.1"
versions.lifecycle = "1.1.1"
versions.room = "1.1.1"
versions.paging = "1.0.1"
versions.gson = "2.8.5"
//test
versions.junit = "4.12"
versions.runner = "1.0.2"
versions.espresso = "3.0.2"
ext.versions = versions
//deps依赖库
ext.deps = [:]
def deps = [:]
//google
deps.multidex = "com.android.support:multidex:$versions.multidex"
deps.v4 = "com.android.support:support-v4:$versions.support"
deps.app_compat = "com.android.support:appcompat-v7:$versions.support"
deps.annotations = "com.android.support:support-annotations:$versions.support"
deps.recyclerview = "com.android.support:recyclerview-v7:$versions.support"
deps.design = "com.android.support:design:$versions.support"
deps.constraint = "com.android.support.constraint:constraint-layout:$versions.constraint"
deps.cardview = "com.android.support:cardview-v7:$versions.support"
deps.kotlin = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
deps.dagger = "com.google.dagger:dagger:$versions.dagger"
deps.dagger_android_support = "com.google.dagger:dagger-android-support:$versions.dagger"
deps.arch_lifecycle_runtime = "android.arch.lifecycle:runtime:$versions.lifecycle"
deps.arch_lifecycle_extensions = "android.arch.lifecycle:extensions:$versions.lifecycle"
deps.arch_lifecycle_java8 = "android.arch.lifecycle:common-java8:$versions.lifecycle"
deps.room_runtime = "android.arch.persistence.room:runtime:$versions.room"
deps.room_rxjava2 = "android.arch.persistence.room:rxjava2:$versions.room"
deps.room_testing = "android.arch.persistence.room:testing:$versions.room"
deps.paging = "android.arch.paging:runtime:$versions.paging"
deps.gson = "com.google.code.gson:gson:$versions.gson"
//test
deps.junit = "junit:junit:$versions.junit"
deps.arch_testing = "android.arch.core:core-testing:$versions.arch"
deps.runner = "com.android.support.test:runner:$versions.runner"
deps.espresso = "com.android.support.test.espresso:espresso-core:$versions.espresso"
//utils
deps.utilcode = "com.blankj:utilcode:$versions.utilcode"
deps.stickyDecoration = "com.gavin.com.library:stickyDecoration:$versions.stickyDecoration"
ext.deps = deps
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment