Files
psu-schedule/android/app/build.gradle.kts
Zakhar Timoshenko d900e038b6 feat: add Next Lesson widget and enhance existing widgets
- Implemented a new Next Lesson widget to display the upcoming lesson details on the home screen.
- Updated Today widget to dynamically adjust the number of lessons displayed based on available space.
- Enhanced the Settings screen to allow users to manage hidden lessons more effectively.
- Introduced harmonized color palettes for better visual consistency across themes.
- Updated the timetable API to support a new range parameter for semester-based queries.
- Added tests to ensure the new semester range functionality works as expected.
- Refactored widget styling for improved appearance on devices with different Android versions.
2026-10-18 00:39:32 +03:00

72 lines
2.2 KiB
Kotlin

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.kotlin.serialization)
}
val apiUrl = providers.gradleProperty("PSU_API_URL")
.orElse(providers.environmentVariable("PSU_API_URL"))
.orElse("http://10.0.2.2:3010/")
.map { if (it.endsWith("/")) it else "$it/" }
android {
namespace = "ritm.schedule"
compileSdk {
version = release(37) { minorApiLevel = 1 }
}
defaultConfig {
applicationId = "ritm.schedule"
minSdk = 26
targetSdk = 36
versionCode = 1
versionName = "0.1.0"
buildConfigField("String", "API_URL", "\"${apiUrl.get()}\"")
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
// A release build must talk to a public HTTPS server.
require(apiUrl.get().startsWith("https://") || !gradle.startParameter.taskNames.any { "Release" in it }) {
"Для релиза укажите HTTPS-адрес: -PPSU_API_URL=https://…"
}
}
}
buildFeatures {
compose = true
buildConfig = true
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
isCoreLibraryDesugaringEnabled = true
}
}
dependencies {
implementation(platform(libs.compose.bom))
implementation(libs.compose.ui)
implementation(libs.compose.material3)
implementation(libs.compose.icons)
implementation(libs.compose.ui.tooling.preview)
debugImplementation(libs.compose.ui.tooling)
implementation(libs.activity.compose)
implementation(libs.lifecycle.viewmodel.compose)
implementation(libs.lifecycle.runtime.compose)
implementation(libs.core.ktx)
implementation(libs.coroutines.android)
implementation(libs.serialization.json)
implementation(libs.okhttp)
implementation(libs.datastore.preferences)
implementation(libs.glance.appwidget)
implementation(libs.glance.material3)
implementation(libs.work.runtime)
implementation(libs.material)
coreLibraryDesugaring(libs.desugar)
testImplementation(libs.junit)
}