Переименован пакет

This commit is contained in:
Пытков Роман
2024-09-22 22:36:38 +03:00
parent f9cbec0c80
commit 81ecb18c87
35 changed files with 309 additions and 80 deletions

View File

@@ -2,16 +2,16 @@ plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.ksp)
alias(libs.plugins.dagger.hilt)
alias(libs.plugins.ksp)
}
android {
namespace = "ru.freedominc.wallenc"
namespace = "com.github.nullptroma.wallenc"
compileSdk = 34
defaultConfig {
applicationId = "ru.freedominc.wallenc"
applicationId = "com.github.nullptroma.wallenc"
minSdk = 24
targetSdk = 34
versionCode = 1
@@ -53,7 +53,8 @@ android {
}
dependencies {
implementation(libs.androidx.navigation)
implementation(libs.navigation)
implementation(libs.navigation.hilt.compose)
// Yandex
implementation(libs.yandex.oauth)
@@ -91,4 +92,7 @@ dependencies {
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
implementation(project(":domain"))
implementation(project(":data"))
}

View File

@@ -1,37 +0,0 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "ru.freedominc.wallenc",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-release.apk"
}
],
"elementType": "File",
"baselineProfiles": [
{
"minApi": 28,
"maxApi": 30,
"baselineProfiles": [
"baselineProfiles/1/app-release.dm"
]
},
{
"minApi": 31,
"maxApi": 2147483647,
"baselineProfiles": [
"baselineProfiles/0/app-release.dm"
]
}
],
"minSdkVersionForDexing": 24
}

View File

@@ -1,4 +1,4 @@
package ru.freedominc.wallenc
package com.github.nullptroma.wallenc
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
@@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("ru.freedominc.wallenc", appContext.packageName)
assertEquals("com.github.nullptroma.wallenc", appContext.packageName)
}
}

View File

@@ -16,6 +16,7 @@
<activity
android:name=".MainActivity"
android:exported="true"
android:windowSoftInputMode="adjustNothing"
android:theme="@style/Theme.Wallenc">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@@ -1,4 +1,4 @@
package ru.freedominc.wallenc
package com.github.nullptroma.wallenc
import android.os.Bundle
import android.widget.Toast
@@ -18,13 +18,17 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.hilt.navigation.compose.hiltViewModel
import com.github.nullptroma.wallenc.ui.screens.main.MainScreen
import com.github.nullptroma.wallenc.ui.screens.main.MainViewModel
import com.github.nullptroma.wallenc.ui.theme.WallencTheme
import com.yandex.authsdk.YandexAuthLoginOptions
import com.yandex.authsdk.YandexAuthOptions
import com.yandex.authsdk.YandexAuthResult
import com.yandex.authsdk.YandexAuthSdk
import com.yandex.authsdk.internal.strategy.LoginType
import dagger.hilt.android.AndroidEntryPoint
import ru.freedominc.wallenc.ui.theme.WallencTheme
@AndroidEntryPoint
class MainActivity : ComponentActivity() {
@@ -40,9 +44,8 @@ class MainActivity : ComponentActivity() {
setContent {
WallencTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
Greeting(modifier = Modifier.padding(innerPadding)) {
launcher.launch(loginOptions)
}
val vm : MainViewModel = hiltViewModel()
MainScreen(Modifier.padding(innerPadding), vm)
}
}
}

View File

@@ -1,4 +1,4 @@
package ru.freedominc.wallenc
package com.github.nullptroma.wallenc
import android.app.Application
import dagger.hilt.android.HiltAndroidApp

View File

@@ -0,0 +1,27 @@
package com.github.nullptroma.wallenc.ui.screens.main
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.imePadding
import androidx.compose.material3.Text
import androidx.compose.material3.TextField
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.hilt.navigation.compose.hiltViewModel
@Composable
fun MainScreen(modifier: Modifier = Modifier, viewModel: MainViewModel = hiltViewModel()) {
val state = viewModel.stateFlow
Column(modifier = modifier.imePadding()) {
Text(text = state.value)
Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.BottomCenter) {
TextField("", onValueChange = {
})
}
}
}

View File

@@ -0,0 +1,3 @@
package com.github.nullptroma.wallenc.ui.screens.main
data class MainScreenState(val value: String)

View File

@@ -0,0 +1,11 @@
package com.github.nullptroma.wallenc.ui.screens.main
import androidx.lifecycle.ViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
@HiltViewModel
class MainViewModel @Inject constructor(
): ViewModel() {
val stateFlow = MainScreenState("hello")
}

View File

@@ -1,4 +1,4 @@
package ru.freedominc.wallenc.ui.theme
package com.github.nullptroma.wallenc.ui.theme
import androidx.compose.ui.graphics.Color

View File

@@ -1,4 +1,4 @@
package ru.freedominc.wallenc.ui.theme
package com.github.nullptroma.wallenc.ui.theme
import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme

View File

@@ -1,4 +1,4 @@
package ru.freedominc.wallenc.ui.theme
package com.github.nullptroma.wallenc.ui.theme
import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle

View File

@@ -1,8 +0,0 @@
package ru.freedominc.wallenc.ui.screens.main
import androidx.compose.runtime.Composable
@Composable
fun MainScreen(viewModel: MainViewModel) {
}

View File

@@ -1,3 +0,0 @@
package ru.freedominc.wallenc.ui.screens.main
data class MainScreenState(val value: Int)

View File

@@ -1,9 +0,0 @@
package ru.freedominc.wallenc.ui.screens.main
import androidx.lifecycle.ViewModel
import dagger.hilt.android.lifecycle.HiltViewModel
@HiltViewModel
class MainViewModel : ViewModel() {
}

View File

@@ -1,4 +1,4 @@
package ru.freedominc.wallenc
package com.github.nullptroma.wallenc
import org.junit.Test