base
parent
210788e1a1
commit
1857cdb0b8
|
@ -12,7 +12,9 @@
|
|||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/service" />
|
||||
<option value="$PROJECT_DIR$/uikit" />
|
||||
<option value="$PROJECT_DIR$/util" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
|
|
|
@ -39,4 +39,7 @@ android {
|
|||
dependencies {
|
||||
|
||||
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:theme="@style/Theme.Android_ulsService"
|
||||
tools:targetApi="31">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:name=".module.home.MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
|
@ -22,6 +23,10 @@
|
|||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".module.test.FuncListActivity"
|
||||
android:exported="false" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -1,4 +1,4 @@
|
|||
package com.uls.service
|
||||
package com.uls.service.module.home
|
||||
|
||||
import android.os.Bundle
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
|
@ -7,6 +7,7 @@ import androidx.navigation.findNavController
|
|||
import androidx.navigation.ui.AppBarConfiguration
|
||||
import androidx.navigation.ui.setupActionBarWithNavController
|
||||
import androidx.navigation.ui.setupWithNavController
|
||||
import com.uls.service.R
|
||||
import com.uls.service.databinding.ActivityMainBinding
|
||||
|
||||
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.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.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.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.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.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.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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.dashboard.DashboardFragment">
|
||||
tools:context=".module.home.ui.dashboard.DashboardFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_dashboard"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.home.HomeFragment">
|
||||
tools:context=".module.home.ui.home.HomeFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_home"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.notifications.NotificationsFragment">
|
||||
tools:context=".module.home.ui.notifications.NotificationsFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_notifications"
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
|
||||
<fragment
|
||||
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"
|
||||
tools:layout="@layout/fragment_home" />
|
||||
|
||||
<fragment
|
||||
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"
|
||||
tools:layout="@layout/fragment_dashboard" />
|
||||
|
||||
<fragment
|
||||
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"
|
||||
tools:layout="@layout/fragment_notifications" />
|
||||
</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('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"
|
||||
include ':app'
|
||||
include ':uikit'
|
||||
include ':util'
|
||||
include ':service'
|
||||
|
|
|
@ -32,14 +32,10 @@ android {
|
|||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.8.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
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'
|
||||
api project(":uikit")
|
||||
api androidxLibs.bundles.androidx
|
||||
api googleLibs.material
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
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