Skip to content

Commit

Permalink
Add new commands and upgrade sdks
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSchubert committed Nov 12, 2023
1 parent e381983 commit d4912e7
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 46 deletions.
18 changes: 9 additions & 9 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ repositories {
dependencies {
implementation(project(":common"))
implementation("androidx.activity:activity-compose:1.8.0")
implementation("androidx.compose.material:material:1.5.3")
implementation("androidx.navigation:navigation-compose:2.7.4")
implementation("androidx.compose.material:material:1.5.4")
implementation("androidx.navigation:navigation-compose:2.7.5")
implementation("com.google.accompanist:accompanist-appcompat-theme:0.32.0")
implementation("com.google.accompanist:accompanist-systemuicontroller:0.32.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2")
implementation("androidx.preference:preference:1.2.1")
implementation("androidx.compose.ui:ui-tooling-preview:1.5.3")
implementation("androidx.compose.ui:ui-tooling-preview:1.5.4")

implementation("io.insert-koin:koin-core:3.5.0")
implementation("io.insert-koin:koin-android:3.5.0")
implementation("io.insert-koin:koin-androidx-compose:3.5.0")
implementation("androidx.compose.foundation:foundation:1.5.3")
implementation("androidx.compose.foundation:foundation:1.5.4")

androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.5.3")
debugImplementation("androidx.compose.ui:ui-test-manifest:1.5.3")
debugImplementation("androidx.compose.ui:ui-tooling:1.5.3")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.5.4")
debugImplementation("androidx.compose.ui:ui-test-manifest:1.5.4")
debugImplementation("androidx.compose.ui:ui-tooling:1.5.4")
}

android {
Expand All @@ -37,7 +37,7 @@ android {
applicationId = "com.inspiredandroid.linuxcommandbibliotheca"
minSdk = 24
targetSdk = 34
versionCode = 84
versionCode = 85
versionName = project.version.toString()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -62,7 +62,7 @@ android {
}

composeOptions {
kotlinCompilerExtensionVersion = "1.5.3"
kotlinCompilerExtensionVersion = "1.5.4"
}

compileOptions {
Expand Down
Binary file modified android/release/android-release.aab
Binary file not shown.
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
android:installLocation="preferExternal">

<application
android:name=".LinixApplication"
android:name=".LinuxApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.core.context.GlobalContext.startKoin
import org.koin.dsl.module

class LinixApplication : Application() {
class LinuxApplication : Application() {

override fun onCreate() {
super.onCreate()

startKoin {
androidLogger()
androidContext(this@LinixApplication)
androidContext(this@LinuxApplication)
modules(appModule)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ sealed class Screen(
@StringRes val resourceId: Int,
@DrawableRes val drawableRes: Int
) {
object Commands : Screen("commands", R.string.commands, R.drawable.ic_search_40dp)
object Basics : Screen("basics", R.string.basics, R.drawable.ic_puzzle)
object Tips : Screen("tips", R.string.tips, R.drawable.ic_idea)
data object Commands : Screen("commands", R.string.commands, R.drawable.ic_search_40dp)
data object Basics : Screen("basics", R.string.basics, R.drawable.ic_puzzle)
data object Tips : Screen("tips", R.string.tips, R.drawable.ic_idea)
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ class PreferenceUtil(private val context: Context) {
companion object {
const val KEY_BOOKMARKS = "KEY_BOOKMARKS"
const val KEY_DATABASE_VERSION = "DATABASE_VERSION"
const val CURRENT_DATABASE_VERSION = 6
const val CURRENT_DATABASE_VERSION = 7
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.inspiredandroid.linuxcommandbibliotheca.ui.screens

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
Expand All @@ -11,7 +11,6 @@ import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Alignment
Expand All @@ -33,21 +32,23 @@ fun InitializeDatabaseScreen(onFinish: () -> Unit = {}) {
val coroutineScope = rememberCoroutineScope()
val context = LocalContext.current

Box(modifier = Modifier.fillMaxSize()) {
Column(modifier = Modifier.align(Alignment.Center)) {
Image(
painterResource(R.mipmap.ic_launcher_foreground),
contentDescription = null,
modifier = Modifier
.size(240.dp)
.align(Alignment.CenterHorizontally)
)
Text("Initialize database", modifier = Modifier.align(Alignment.CenterHorizontally))
LinearProgressIndicator(
progress = status.intValue.div(100f),
modifier = Modifier.padding(top = 16.dp)
)
}
Column(
modifier = Modifier.fillMaxSize(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
Image(
painterResource(R.mipmap.ic_launcher_foreground),
contentDescription = null,
modifier = Modifier
.size(240.dp)
.align(Alignment.CenterHorizontally)
)
Text("Initialize database", modifier = Modifier.align(Alignment.CenterHorizontally))
LinearProgressIndicator(
progress = status.intValue.div(100f),
modifier = Modifier.padding(top = 16.dp)
)
}

LaunchedEffect(Unit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

package com.inspiredandroid.linuxcommandbibliotheca.ui.screens.tips

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.staggeredgrid.LazyVerticalStaggeredGrid
import androidx.compose.foundation.lazy.staggeredgrid.StaggeredGridCells
import androidx.compose.foundation.lazy.staggeredgrid.items
import androidx.compose.material.Card
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.Text
Expand Down Expand Up @@ -35,19 +35,16 @@ import org.koin.androidx.compose.getViewModel
* limitations under the License.
*/

@OptIn(ExperimentalFoundationApi::class)
@Composable
fun TipsScreen(onNavigate: (String) -> Unit = {}, viewModel: TipsViewModel = getViewModel()) {

LazyVerticalStaggeredGrid(
columns = StaggeredGridCells.Adaptive(minSize = 300.dp),
) {

items(count = viewModel.tips.size,
key = { viewModel.tips[it].tip.id }
) {
val tip = viewModel.tips[it]

items(
items = viewModel.tips,
key = { it.tip.id }
) { tip ->
Card(
elevation = 4.dp, modifier = Modifier
.padding(4.dp)
Expand Down
Binary file modified assets/database.db
Binary file not shown.
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask

plugins {
id("com.github.ben-manes.versions") version "0.48.0"
id("com.github.ben-manes.versions") version "0.49.0"
}

buildscript {
Expand All @@ -11,14 +11,14 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10")
classpath("com.android.tools.build:gradle:8.1.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
classpath("com.android.tools.build:gradle:8.1.3")
classpath("com.squareup.sqldelight:gradle-plugin:1.5.5")
}
}

group = "org.example"
version = "3.2.2"
version = "3.2.3"

allprojects {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion desktop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ kotlin {
dependencies {
implementation(project(":common"))
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.9.1")
implementation("org.json:json:20230618")
implementation("org.json:json:20231013")
}
}
val jvmTest by getting
Expand Down
2 changes: 2 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/85.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add commands
Upgrade sdks

0 comments on commit d4912e7

Please sign in to comment.