Compare commits
No commits in common. "31c81021ce333a03d3c4a67056fb6af11246e670" and "790a5fabcd240093c908d18b2985f5fe5a38d3b2" have entirely different histories.
31c81021ce
...
790a5fabcd
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,4 +8,3 @@
|
|||||||
.externalNativeBuild
|
.externalNativeBuild
|
||||||
.cxx
|
.cxx
|
||||||
local.properties
|
local.properties
|
||||||
secrets.properties
|
|
12
NOTICE.md
12
NOTICE.md
@ -8,6 +8,12 @@ This project incorporates components from the following third-party libraries:
|
|||||||
Licensed under Apache License 2.0
|
Licensed under Apache License 2.0
|
||||||
[https://developer.android.com](https://developer.android.com)
|
[https://developer.android.com](https://developer.android.com)
|
||||||
|
|
||||||
|
## ACRA
|
||||||
|
- **ch.acra:acra-http**
|
||||||
|
Copyright ACRA
|
||||||
|
Licensed under Apache License 2.0
|
||||||
|
[https://github.com/ACRA/acra](https://github.com/ACRA/acra)
|
||||||
|
|
||||||
## Coil
|
## Coil
|
||||||
- **io.coil-kt:coil-compose**
|
- **io.coil-kt:coil-compose**
|
||||||
Copyright Coil Contributors
|
Copyright Coil Contributors
|
||||||
@ -47,12 +53,6 @@ This project incorporates components from the following third-party libraries:
|
|||||||
Copyright Google LLC
|
Copyright Google LLC
|
||||||
Licensed under Apache License 2.0
|
Licensed under Apache License 2.0
|
||||||
|
|
||||||
## Sentry Android
|
|
||||||
- **io.sentry:sentry-android**
|
|
||||||
Copyright Sentry and contributors
|
|
||||||
Licensed under MIT License
|
|
||||||
[https://github.com/getsentry/sentry-java](https://github.com/getsentry/sentry-java)
|
|
||||||
|
|
||||||
## Build Tools
|
## Build Tools
|
||||||
- **Gradle Plugins** (Android, Kotlin)
|
- **Gradle Plugins** (Android, Kotlin)
|
||||||
Copyright Google LLC / JetBrains s.r.o.
|
Copyright Google LLC / JetBrains s.r.o.
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
import java.time.format.DateTimeFormatter
|
import java.time.format.DateTimeFormatter
|
||||||
import java.util.Properties
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.androidApplication)
|
alias(libs.plugins.androidApplication)
|
||||||
@ -10,7 +9,6 @@ plugins {
|
|||||||
alias(libs.plugins.kotlin.compose)
|
alias(libs.plugins.kotlin.compose)
|
||||||
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
|
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
|
||||||
id("com.google.devtools.ksp")
|
id("com.google.devtools.ksp")
|
||||||
id("io.sentry.android.gradle") version "5.5.0"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
secrets {
|
secrets {
|
||||||
@ -34,15 +32,6 @@ android {
|
|||||||
useSupportLibrary = true
|
useSupportLibrary = true
|
||||||
}
|
}
|
||||||
|
|
||||||
val secretProperties = Properties().apply {
|
|
||||||
val secretFile = rootProject.file("secrets.properties")
|
|
||||||
if (secretFile.exists())
|
|
||||||
secretFile.inputStream().use { load(it) }
|
|
||||||
else
|
|
||||||
println("Warning: secrets.properties not found!")
|
|
||||||
}
|
|
||||||
manifestPlaceholders["sentry_url"] = secretProperties.getProperty("SENTRY_URL")!!
|
|
||||||
|
|
||||||
// javaCompileOptions {
|
// javaCompileOptions {
|
||||||
// annotationProcessorOptions {
|
// annotationProcessorOptions {
|
||||||
// arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
|
// arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
|
||||||
@ -55,21 +44,18 @@ android {
|
|||||||
isMinifyEnabled = false
|
isMinifyEnabled = false
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
resValue("string", "app_name", "@string/app_name_reg")
|
resValue("string", "app_name", "@string/app_name_reg")
|
||||||
manifestPlaceholders["sentry_env"] = "production"
|
|
||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
applicationIdSuffix = ".debug"
|
applicationIdSuffix = ".debug"
|
||||||
versionNameSuffix =
|
versionNameSuffix =
|
||||||
"-debug+${LocalDateTime.now().format(DateTimeFormatter.BASIC_ISO_DATE)}"
|
"-debug+${LocalDateTime.now().format(DateTimeFormatter.BASIC_ISO_DATE)}"
|
||||||
resValue("string", "app_name", "@string/app_name_dev")
|
resValue("string", "app_name", "@string/app_name_dev")
|
||||||
manifestPlaceholders["sentry_env"] = "debug"
|
|
||||||
}
|
}
|
||||||
create("beta") {
|
create("beta") {
|
||||||
versionNameSuffix =
|
versionNameSuffix =
|
||||||
"-beta+${LocalDateTime.now().format(DateTimeFormatter.BASIC_ISO_DATE)}"
|
"-beta+${LocalDateTime.now().format(DateTimeFormatter.BASIC_ISO_DATE)}"
|
||||||
resValue("string", "app_name", "@string/app_name_beta")
|
resValue("string", "app_name", "@string/app_name_beta")
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
manifestPlaceholders["sentry_env"] = "beta"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
@ -134,7 +120,7 @@ dependencies {
|
|||||||
|
|
||||||
implementation(libs.compose)
|
implementation(libs.compose)
|
||||||
|
|
||||||
implementation(libs.sentry)
|
implementation(libs.acra.http)
|
||||||
|
|
||||||
implementation(libs.androidx.room.runtime)
|
implementation(libs.androidx.room.runtime)
|
||||||
implementation(libs.androidx.room.ktx)
|
implementation(libs.androidx.room.ktx)
|
||||||
|
@ -15,35 +15,6 @@
|
|||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.UNN"
|
android:theme="@style/Theme.UNN"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
|
|
||||||
<meta-data
|
|
||||||
android:name="io.sentry.dsn"
|
|
||||||
android:value="${sentry_url}" />
|
|
||||||
<meta-data
|
|
||||||
android:name="io.sentry.environment"
|
|
||||||
android:value="${sentry_env}" />
|
|
||||||
<meta-data
|
|
||||||
android:name="io.sentry.send-default-pii"
|
|
||||||
android:value="true" />
|
|
||||||
<meta-data
|
|
||||||
android:name="io.sentry.traces.sample-rate"
|
|
||||||
android:value="1.0" />
|
|
||||||
<meta-data
|
|
||||||
android:name="io.sentry.traces.user-interaction.enable"
|
|
||||||
android:value="true" />
|
|
||||||
<meta-data
|
|
||||||
android:name="io.sentry.attach-screenshot"
|
|
||||||
android:value="true" />
|
|
||||||
<meta-data
|
|
||||||
android:name="io.sentry.attach-view-hierarchy"
|
|
||||||
android:value="true" />
|
|
||||||
<meta-data
|
|
||||||
android:name="io.sentry.session-replay.on-error-sample-rate"
|
|
||||||
android:value="1.0" />
|
|
||||||
<meta-data
|
|
||||||
android:name="io.sentry.session-replay.session-sample-rate"
|
|
||||||
android:value="0.1" />
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.layout.MainActivity"
|
android:name=".ui.layout.MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
@ -8,5 +8,16 @@ import android.content.Context
|
|||||||
class UNNApp : Application() {
|
class UNNApp : Application() {
|
||||||
override fun attachBaseContext(base: Context) {
|
override fun attachBaseContext(base: Context) {
|
||||||
super.attachBaseContext(base)
|
super.attachBaseContext(base)
|
||||||
|
|
||||||
|
// initAcra {
|
||||||
|
// buildConfigClass = BuildConfig::class.java
|
||||||
|
// reportFormat = StringFormat.JSON
|
||||||
|
// httpSender {
|
||||||
|
// uri = BuildConfig.ACRA_URL
|
||||||
|
// basicAuthLogin = BuildConfig.ACRA_LOGIN
|
||||||
|
// basicAuthPassword = BuildConfig.ACRA_PASS
|
||||||
|
// httpMethod = HttpSender.Method.POST
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,38 +0,0 @@
|
|||||||
// Copyright (c) 2025 Gleb Zaharov. License: GPLv3 (see LICENSE).
|
|
||||||
|
|
||||||
package ru.sweetbread.unn.ui.composes
|
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
|
||||||
import androidx.compose.foundation.layout.Column
|
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
|
||||||
import androidx.compose.foundation.layout.padding
|
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.Text
|
|
||||||
import androidx.compose.runtime.Composable
|
|
||||||
import androidx.compose.ui.Modifier
|
|
||||||
import androidx.compose.ui.unit.dp
|
|
||||||
import ru.sweetbread.unn.R
|
|
||||||
import splitties.resources.appStr
|
|
||||||
|
|
||||||
@Composable
|
|
||||||
fun About() {
|
|
||||||
Column(Modifier.fillMaxSize()) {
|
|
||||||
Text(
|
|
||||||
appStr(R.string.developer),
|
|
||||||
style = MaterialTheme.typography.headlineMedium
|
|
||||||
)
|
|
||||||
Column(
|
|
||||||
Modifier
|
|
||||||
.fillMaxWidth()
|
|
||||||
.background(
|
|
||||||
color = MaterialTheme.colorScheme.surfaceContainerHigh,
|
|
||||||
shape = RoundedCornerShape(16.dp)
|
|
||||||
)
|
|
||||||
.padding(16.dp)
|
|
||||||
) {
|
|
||||||
Text("meow")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -187,7 +187,7 @@ fun PostItem(modifier: Modifier = Modifier, post: Post, extended: Boolean = fals
|
|||||||
LinearProgressIndicator(
|
LinearProgressIndicator(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(horizontal = 8.dp, vertical = 38.dp),
|
.padding(8.dp),
|
||||||
color = MaterialTheme.colorScheme.surfaceVariant,
|
color = MaterialTheme.colorScheme.surfaceVariant,
|
||||||
trackColor = MaterialTheme.colorScheme.secondary,
|
trackColor = MaterialTheme.colorScheme.secondary,
|
||||||
)
|
)
|
||||||
|
@ -24,7 +24,6 @@ import androidx.compose.material.icons.filled.AccountBox
|
|||||||
import androidx.compose.material.icons.filled.DateRange
|
import androidx.compose.material.icons.filled.DateRange
|
||||||
import androidx.compose.material.icons.filled.Home
|
import androidx.compose.material.icons.filled.Home
|
||||||
import androidx.compose.material.icons.filled.Menu
|
import androidx.compose.material.icons.filled.Menu
|
||||||
import androidx.compose.material.icons.outlined.Info
|
|
||||||
import androidx.compose.material3.CenterAlignedTopAppBar
|
import androidx.compose.material3.CenterAlignedTopAppBar
|
||||||
import androidx.compose.material3.DrawerValue
|
import androidx.compose.material3.DrawerValue
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
@ -61,7 +60,6 @@ import kotlinx.coroutines.launch
|
|||||||
import ru.sweetbread.unn.R
|
import ru.sweetbread.unn.R
|
||||||
import ru.sweetbread.unn.api.ME
|
import ru.sweetbread.unn.api.ME
|
||||||
import ru.sweetbread.unn.api.portalURL
|
import ru.sweetbread.unn.api.portalURL
|
||||||
import ru.sweetbread.unn.ui.composes.About
|
|
||||||
import ru.sweetbread.unn.ui.composes.Blogposts
|
import ru.sweetbread.unn.ui.composes.Blogposts
|
||||||
import ru.sweetbread.unn.ui.composes.Schedule
|
import ru.sweetbread.unn.ui.composes.Schedule
|
||||||
import ru.sweetbread.unn.ui.theme.UNNTheme
|
import ru.sweetbread.unn.ui.theme.UNNTheme
|
||||||
@ -180,9 +178,6 @@ class MainActivity : ComponentActivity() {
|
|||||||
composable("journal/schedule") {
|
composable("journal/schedule") {
|
||||||
Schedule()
|
Schedule()
|
||||||
}
|
}
|
||||||
composable("about") {
|
|
||||||
About()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -224,8 +219,7 @@ class MainActivity : ComponentActivity() {
|
|||||||
TextButton(
|
TextButton(
|
||||||
{},
|
{},
|
||||||
Modifier.fillMaxWidth(),
|
Modifier.fillMaxWidth(),
|
||||||
shape = RectangleShape,
|
shape = RectangleShape
|
||||||
enabled = false
|
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
appStr(R.string.record_book),
|
appStr(R.string.record_book),
|
||||||
@ -237,8 +231,7 @@ class MainActivity : ComponentActivity() {
|
|||||||
TextButton(
|
TextButton(
|
||||||
{},
|
{},
|
||||||
Modifier.fillMaxWidth(),
|
Modifier.fillMaxWidth(),
|
||||||
shape = RectangleShape,
|
shape = RectangleShape
|
||||||
enabled = false
|
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
appStr(R.string.documents),
|
appStr(R.string.documents),
|
||||||
@ -250,8 +243,7 @@ class MainActivity : ComponentActivity() {
|
|||||||
TextButton(
|
TextButton(
|
||||||
{},
|
{},
|
||||||
Modifier.fillMaxWidth(),
|
Modifier.fillMaxWidth(),
|
||||||
shape = RectangleShape,
|
shape = RectangleShape
|
||||||
enabled = false
|
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
appStr(R.string.materials),
|
appStr(R.string.materials),
|
||||||
@ -264,15 +256,10 @@ class MainActivity : ComponentActivity() {
|
|||||||
|
|
||||||
HorizontalDivider()
|
HorizontalDivider()
|
||||||
TextButton(
|
TextButton(
|
||||||
{navController.navigate("about")},
|
{},
|
||||||
Modifier.fillMaxWidth(),
|
Modifier.fillMaxWidth(),
|
||||||
shape = RectangleShape
|
shape = RectangleShape
|
||||||
) {
|
) {
|
||||||
Icon(
|
|
||||||
imageVector = Icons.Outlined.Info,
|
|
||||||
contentDescription = "Info",
|
|
||||||
modifier = Modifier.padding(horizontal = 4.dp)
|
|
||||||
)
|
|
||||||
Text(appStr(R.string.about_app))
|
Text(appStr(R.string.about_app))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
<string name="about_app">About app</string>
|
<string name="about_app">About app</string>
|
||||||
<string name="documents">Documents</string>
|
<string name="documents">Documents</string>
|
||||||
<string name="materials">Materials</string>
|
<string name="materials">Materials</string>
|
||||||
<string name="developer">Developer</string>
|
|
||||||
<string-array name="short_weekdays">
|
<string-array name="short_weekdays">
|
||||||
<item>Mn</item>
|
<item>Mn</item>
|
||||||
<item>Tu</item>
|
<item>Tu</item>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
[versions]
|
[versions]
|
||||||
|
acraHttp = "5.11.3"
|
||||||
agp = "8.7.3"
|
agp = "8.7.3"
|
||||||
calendar = "2.6.2"
|
calendar = "2.6.2"
|
||||||
coilCompose = "2.7.0"
|
coilCompose = "2.7.0"
|
||||||
@ -22,11 +23,11 @@ activity = "1.10.1"
|
|||||||
navigationCompose = "2.8.9"
|
navigationCompose = "2.8.9"
|
||||||
roomRuntime = "2.7.1"
|
roomRuntime = "2.7.1"
|
||||||
secretsGradlePlugin = "2.0.1"
|
secretsGradlePlugin = "2.0.1"
|
||||||
sentryAndroid = "8.12.0"
|
|
||||||
splitties = "3.0.0"
|
splitties = "3.0.0"
|
||||||
materialIconsCoreAndroid = "1.7.8"
|
materialIconsCoreAndroid = "1.7.8"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
acra-http = { module = "ch.acra:acra-http", version.ref = "acraHttp" }
|
||||||
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||||
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" }
|
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" }
|
||||||
androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" }
|
androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" }
|
||||||
@ -61,7 +62,6 @@ androidx-lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecy
|
|||||||
androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycle" }
|
androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycle" }
|
||||||
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
||||||
secrets-gradle-plugin = { module = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin", version.ref = "secretsGradlePlugin" }
|
secrets-gradle-plugin = { module = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin", version.ref = "secretsGradlePlugin" }
|
||||||
sentry = { module = "io.sentry:sentry-android", version.ref = "sentryAndroid" }
|
|
||||||
splitties-base = { module = "com.louiscad.splitties:splitties-fun-pack-android-base-with-views-dsl", version.ref = "splitties" }
|
splitties-base = { module = "com.louiscad.splitties:splitties-fun-pack-android-base-with-views-dsl", version.ref = "splitties" }
|
||||||
splitties-room = { module = "com.louiscad.splitties:splitties-arch-room", version.ref = "splitties" }
|
splitties-room = { module = "com.louiscad.splitties:splitties-arch-room", version.ref = "splitties" }
|
||||||
androidx-material-icons-core-android = { group = "androidx.compose.material", name = "material-icons-core-android", version.ref = "materialIconsCoreAndroid" }
|
androidx-material-icons-core-android = { group = "androidx.compose.material", name = "material-icons-core-android", version.ref = "materialIconsCoreAndroid" }
|
||||||
@ -70,3 +70,4 @@ androidx-material-icons-core-android = { group = "androidx.compose.material", na
|
|||||||
androidApplication = { id = "com.android.application", version.ref = "agp" }
|
androidApplication = { id = "com.android.application", version.ref = "agp" }
|
||||||
jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||||
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
||||||
|
|
||||||
|
5
secrets.properties
Normal file
5
secrets.properties
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Copyright (c) 2025 Gleb Zaharov. License: GPLv3 (see LICENSE).
|
||||||
|
|
||||||
|
ACRA_URL=https://bugs.coders-squad.com/report
|
||||||
|
ACRA_LOGIN=pMJkqPlNLX4kQ3kK
|
||||||
|
ACRA_PASS=HYY72oV4ybmpCggC
|
Loading…
x
Reference in New Issue
Block a user