Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
haife committed Feb 1, 2023
1 parent 3bd20f5 commit 9116e6d
Show file tree
Hide file tree
Showing 16 changed files with 127 additions and 253 deletions.
21 changes: 10 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
buildToolsVersion rootProject.ext.android["buildToolsVersion"]
compileSdkVersion 29
buildToolsVersion "29.0.2"

defaultConfig {
applicationId "com.haife.mcas"
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 29
versionCode 1
versionName "1.0"

Expand All @@ -30,15 +31,13 @@ android {
}
}

configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.6.0'
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(path: ':mcas')
implementation 'androidx.appcompat:appcompat:1.6.0'

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
52 changes: 0 additions & 52 deletions app/src/main/java/com/haife/mcas/BlankFragment.kt

This file was deleted.

11 changes: 7 additions & 4 deletions app/src/main/java/com/haife/mcas/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
package com.haife.mcas

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.haife.mcas.base.BaseSupportActivity
import com.haife.mcas.base.BaseSwipeBackActivity
import com.haife.mcas.di.component.AppComponent
import com.haife.mcas.mvp.IPresenter
import com.haife.mcas.mvp.presenter.MainPresenter
import com.haife.mcas.mvp.ui.fragment.MainFragment

class MainActivity() : BaseSupportActivity<MainPresenter>() {
class MainActivity : BaseSwipeBackActivity<MainPresenter>() {


override fun setupActivityComponent(appComponent: AppComponent) {

}

override fun initView(savedInstanceState: Bundle?): Int = R.layout.activity_main
override fun initView(savedInstanceState: Bundle?): Int = R.layout.activity_main

override fun initData(savedInstanceState: Bundle?) {
loadRootFragment(R.id.fl_main, BlankFragment.newInstance())
loadRootFragment(R.id.fl_main,MainFragment.newInstance())
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ package com.haife.mcas.di.component

import com.haife.mcas.MainActivity
import com.haife.mcas.di.module.MainModule
import com.haife.mcas.mvp.ui.fragment.MainFragment
import dagger.Component


@Component(modules = [MainModule::class], dependencies = [AppComponent::class])
interface MainComponent {
fun inject(fragment: MainActivity)
fun inject(fragment: MainFragment)

}
4 changes: 3 additions & 1 deletion app/src/main/java/com/haife/mcas/mvp/model/MainModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ constructor(repositoryManager: IRepositoryManager) : BaseModel(repositoryManager
@Inject
lateinit var mApplication: Application


override fun onDestroy() {
super.onDestroy()
}
}
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
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"
android:id="@+id/fl_main"
android:layout_height="match_parent"
tools:context=".MainActivity">

</FrameLayout>
14 changes: 0 additions & 14 deletions app/src/main/res/layout/fragment_blank.xml

This file was deleted.

4 changes: 4 additions & 0 deletions app/src/main/res/layout/fragment_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
android:layout_height="match_parent"
android:orientation="vertical">

<TextView
android:layout_width="match_parent"
android:text="@string/app_name"
android:layout_height="wrap_content"/>
</LinearLayout>
5 changes: 1 addition & 4 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
<resources>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>
<resources></resources>
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: "config.gradle"
buildscript {
ext.kotlin_version = '1.6.0'
ext.kotlin_version = '1.5.0'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.4'
classpath 'com.android.tools.build:gradle:3.6.1'

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}


allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
Expand Down
4 changes: 2 additions & 2 deletions config.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
android = [
compileSdkVersion: 33,
buildToolsVersion: "29.0.2",
compileSdkVersion: 29,
buildToolsVersion: "29.0.0",
minSdkVersion : 19,
targetSdkVersion : 28,
versionCode : 1,
Expand Down
17 changes: 4 additions & 13 deletions mcas/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@

plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-android-extensions'
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
Expand All @@ -16,10 +13,6 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = "1.8"
}

defaultConfig {
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
Expand All @@ -41,8 +34,6 @@ android {
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.6.0'

//support
compileOnly rootProject.ext.dependencies["design"]
//view
Expand Down
15 changes: 1 addition & 14 deletions mcas/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.haife.mcas">

<application>
<activity
android:name=".MainActivity2"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
</application>

</manifest>
package="com.haife.mcas" />
Loading

0 comments on commit 9116e6d

Please sign in to comment.