base
parent
210788e1a1
commit
1857cdb0b8
|
@ -12,7 +12,9 @@
|
||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
<option value="$PROJECT_DIR$/app" />
|
<option value="$PROJECT_DIR$/app" />
|
||||||
|
<option value="$PROJECT_DIR$/service" />
|
||||||
<option value="$PROJECT_DIR$/uikit" />
|
<option value="$PROJECT_DIR$/uikit" />
|
||||||
|
<option value="$PROJECT_DIR$/util" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
|
|
|
@ -39,4 +39,7 @@ android {
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation project(":uikit")
|
implementation project(":uikit")
|
||||||
|
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||||
|
implementation 'com.google.android.material:material:1.5.0'
|
||||||
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
}
|
}
|
|
@ -12,8 +12,9 @@
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.Android_ulsService"
|
android:theme="@style/Theme.Android_ulsService"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".module.home.MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/app_name">
|
android:label="@string/app_name">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
@ -22,6 +23,10 @@
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".module.test.FuncListActivity"
|
||||||
|
android:exported="false" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
|
@ -1,4 +1,4 @@
|
||||||
package com.uls.service
|
package com.uls.service.module.home
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
|
@ -7,6 +7,7 @@ import androidx.navigation.findNavController
|
||||||
import androidx.navigation.ui.AppBarConfiguration
|
import androidx.navigation.ui.AppBarConfiguration
|
||||||
import androidx.navigation.ui.setupActionBarWithNavController
|
import androidx.navigation.ui.setupActionBarWithNavController
|
||||||
import androidx.navigation.ui.setupWithNavController
|
import androidx.navigation.ui.setupWithNavController
|
||||||
|
import com.uls.service.R
|
||||||
import com.uls.service.databinding.ActivityMainBinding
|
import com.uls.service.databinding.ActivityMainBinding
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
|
@ -1,4 +1,4 @@
|
||||||
package com.uls.service.ui.dashboard
|
package com.uls.service.module.home.ui.dashboard
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
|
@ -1,4 +1,4 @@
|
||||||
package com.uls.service.ui.dashboard
|
package com.uls.service.module.home.ui.dashboard
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
|
@ -1,4 +1,4 @@
|
||||||
package com.uls.service.ui.home
|
package com.uls.service.module.home.ui.home
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
|
@ -1,4 +1,4 @@
|
||||||
package com.uls.service.ui.home
|
package com.uls.service.module.home.ui.home
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
|
@ -1,4 +1,4 @@
|
||||||
package com.uls.service.ui.notifications
|
package com.uls.service.module.home.ui.notifications
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
|
@ -1,4 +1,4 @@
|
||||||
package com.uls.service.ui.notifications
|
package com.uls.service.module.home.ui.notifications
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.uls.service.module.test
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.uls.service.R
|
||||||
|
|
||||||
|
class FuncListActivity : AppCompatActivity() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
setContentView(R.layout.activity_func_list)
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".module.test.FuncListActivity">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
>
|
||||||
|
<androidx.constraintlayout.utils.widget.MotionButton
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="打开页面"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
|
@ -4,7 +4,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.dashboard.DashboardFragment">
|
tools:context=".module.home.ui.dashboard.DashboardFragment">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_dashboard"
|
android:id="@+id/text_dashboard"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.home.HomeFragment">
|
tools:context=".module.home.ui.home.HomeFragment">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_home"
|
android:id="@+id/text_home"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.notifications.NotificationsFragment">
|
tools:context=".module.home.ui.notifications.NotificationsFragment">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/text_notifications"
|
android:id="@+id/text_notifications"
|
||||||
|
|
|
@ -7,19 +7,19 @@
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/navigation_home"
|
android:id="@+id/navigation_home"
|
||||||
android:name="com.uls.service.ui.home.HomeFragment"
|
android:name="com.uls.service.module.home.ui.home.HomeFragment"
|
||||||
android:label="@string/title_home"
|
android:label="@string/title_home"
|
||||||
tools:layout="@layout/fragment_home" />
|
tools:layout="@layout/fragment_home" />
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/navigation_dashboard"
|
android:id="@+id/navigation_dashboard"
|
||||||
android:name="com.uls.service.ui.dashboard.DashboardFragment"
|
android:name="com.uls.service.module.home.ui.dashboard.DashboardFragment"
|
||||||
android:label="@string/title_dashboard"
|
android:label="@string/title_dashboard"
|
||||||
tools:layout="@layout/fragment_dashboard" />
|
tools:layout="@layout/fragment_dashboard" />
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/navigation_notifications"
|
android:id="@+id/navigation_notifications"
|
||||||
android:name="com.uls.service.ui.notifications.NotificationsFragment"
|
android:name="com.uls.service.module.home.ui.notifications.NotificationsFragment"
|
||||||
android:label="@string/title_notifications"
|
android:label="@string/title_notifications"
|
||||||
tools:layout="@layout/fragment_notifications" />
|
tools:layout="@layout/fragment_notifications" />
|
||||||
</navigation>
|
</navigation>
|
|
@ -0,0 +1 @@
|
||||||
|
/build
|
|
@ -0,0 +1,35 @@
|
||||||
|
plugins {
|
||||||
|
id 'com.android.library'
|
||||||
|
id 'org.jetbrains.kotlin.android'
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace 'com.service'
|
||||||
|
compileSdk buildsdk.versions.compilesdk.get().toInteger()
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdk buildsdk.versions.minisdk.get().toInteger()
|
||||||
|
targetSdk buildsdk.versions.targetsdk.get().toInteger()
|
||||||
|
|
||||||
|
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_11
|
||||||
|
targetCompatibility JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = '1.8'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api project(":uikit")
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
# 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
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
</manifest>
|
|
@ -22,8 +22,26 @@ dependencyResolutionManagement {
|
||||||
version('minisdk', '26')
|
version('minisdk', '26')
|
||||||
version('targetsdk', '33')
|
version('targetsdk', '33')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create('androidxLibs') {
|
||||||
|
// 别名 group artifact version
|
||||||
|
library('core-ktx', 'androidx.core', 'core-ktx').version('1.8.0')
|
||||||
|
library('appcompat', 'androidx.appcompat', 'appcompat').version('1.4.1')
|
||||||
|
library('constraintlayout', 'androidx.constraintlayout', 'constraintlayout').version('2.1.4')
|
||||||
|
library('navigation-fragment', 'androidx.navigation', 'navigation-fragment-ktx').version('2.5.3')
|
||||||
|
library('navigation-ui', 'androidx.navigation', 'navigation-ui-ktx').version('2.5.3')
|
||||||
|
library('livedata', 'androidx.lifecycle', 'lifecycle-livedata-ktx').version('2.4.1')
|
||||||
|
library('viewmodel', 'androidx.lifecycle', 'lifecycle-viewmodel-ktx').version('2.5.1')
|
||||||
|
// androidX通用依赖
|
||||||
|
bundle('androidx', ['navigation-fragment','navigation-ui','core-ktx', 'appcompat', 'constraintlayout','livedata','viewmodel'])
|
||||||
|
}
|
||||||
|
create('googleLibs') {
|
||||||
|
library('material', 'com.google.android', 'material').version('1.5.0')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rootProject.name = "Android_ulsService"
|
rootProject.name = "Android_ulsService"
|
||||||
include ':app'
|
include ':app'
|
||||||
include ':uikit'
|
include ':uikit'
|
||||||
|
include ':util'
|
||||||
|
include ':service'
|
||||||
|
|
|
@ -32,14 +32,10 @@ android {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation 'androidx.core:core-ktx:1.8.0'
|
api project(":uikit")
|
||||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
api androidxLibs.bundles.androidx
|
||||||
implementation 'com.google.android.material:material:1.5.0'
|
api googleLibs.material
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
|
|
||||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.2'
|
|
||||||
implementation 'androidx.navigation:navigation-ui-ktx:2.5.2'
|
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
/build
|
|
@ -0,0 +1,43 @@
|
||||||
|
plugins {
|
||||||
|
id 'com.android.library'
|
||||||
|
id 'org.jetbrains.kotlin.android'
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace 'com.util'
|
||||||
|
compileSdk buildsdk.versions.compilesdk.get().toInteger()
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdk buildsdk.versions.minisdk.get().toInteger()
|
||||||
|
targetSdk buildsdk.versions.targetsdk.get().toInteger()
|
||||||
|
|
||||||
|
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_11
|
||||||
|
targetCompatibility JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = '1.8'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api "com.blankj:utilcodex:1.31.1"
|
||||||
|
api "io.reactivex.rxjava3:rxjava:3.1.8"
|
||||||
|
api "io.reactivex.rxjava3:rxandroid:3.0.0"
|
||||||
|
api "com.squareup.retrofit2:adapter-rxjava3:2.9.0"
|
||||||
|
api 'com.squareup.retrofit2:retrofit:2.9.0'
|
||||||
|
api 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'
|
||||||
|
api 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||||
|
api 'com.squareup.okhttp3:okhttp:4.2.2'
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
# 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
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
</manifest>
|
Loading…
Reference in New Issue