diff --git a/app/build.gradle b/app/build.gradle
index 3c3711b..2e5fdf2 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -2,19 +2,23 @@ plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id("io.gitlab.arturbosch.detekt")
+ id 'kotlin-parcelize'
}
android {
- compileSdk 32
+ compileSdk 34
defaultConfig {
applicationId "otus.gpb.homework.activities"
minSdk 23
- targetSdk 32
+ targetSdk 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ vectorDrawables {
+ useSupportLibrary true
+ }
}
buildTypes {
@@ -30,6 +34,18 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
+ buildFeatures {
+ compose true
+ }
+ composeOptions {
+ kotlinCompilerExtensionVersion '1.4.8'
+ }
+ packagingOptions {
+ resources {
+ excludes += '/META-INF/{AL2.0,LGPL2.1}'
+ }
+ }
+ namespace 'otus.gpb.homework.activities'
}
detekt {
@@ -52,4 +68,15 @@ dependencies {
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'com.google.android.material:material:1.6.1'
+ implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
+ implementation 'androidx.activity:activity-compose:1.7.0'
+ implementation platform('androidx.compose:compose-bom:2023.03.00')
+ implementation 'androidx.compose.ui:ui'
+ implementation 'androidx.compose.ui:ui-graphics'
+ implementation 'androidx.compose.ui:ui-tooling-preview'
+ implementation 'androidx.compose.material3:material3'
+ androidTestImplementation platform('androidx.compose:compose-bom:2023.03.00')
+ androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
+ debugImplementation 'androidx.compose.ui:ui-tooling'
+ debugImplementation 'androidx.compose.ui:ui-test-manifest'
}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f318e6c..597eeb9 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,7 +1,6 @@
+ xmlns:tools="http://schemas.android.com/tools">
-
+ tools:targetApi="31">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/otus/gpb/homework/activities/ActivityA.kt b/app/src/main/java/otus/gpb/homework/activities/ActivityA.kt
new file mode 100644
index 0000000..4a37535
--- /dev/null
+++ b/app/src/main/java/otus/gpb/homework/activities/ActivityA.kt
@@ -0,0 +1,25 @@
+package otus.gpb.homework.activities
+
+import android.content.Intent
+import android.os.Bundle
+import android.util.Log
+import android.widget.Button
+import androidx.appcompat.app.AppCompatActivity
+
+class ActivityA : AppCompatActivity(R.layout.activity_a) {
+ private val tag="ActivityA"
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ val button=findViewById