renamed modules, created shared library, created wearOS app
This commit is contained in:
parent
6cd37ce171
commit
cdd638a1ee
|
|
@ -4,10 +4,10 @@
|
|||
<selectionStates>
|
||||
<SelectionState runConfigName="Main Activity">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2024-06-30T16:35:05.706671Z">
|
||||
<DropdownSelection timestamp="2025-04-12T08:13:17.128509Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=36131FDHS001TM" />
|
||||
<DeviceId pluginId="LocalEmulator" identifier="path=/Users/michaelbailey/.android/avd/Wear_OS.avd" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
|
|
@ -16,7 +16,10 @@
|
|||
<SelectionState runConfigName="Guide Activity">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
</SelectionState>
|
||||
<SelectionState runConfigName="SettingsActivity">
|
||||
<SelectionState runConfigName="myapplication">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
</SelectionState>
|
||||
<SelectionState runConfigName="MainActivity">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
</SelectionState>
|
||||
</selectionStates>
|
||||
|
|
|
|||
|
|
@ -10,10 +10,11 @@
|
|||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/gym_library" />
|
||||
<option value="$PROJECT_DIR$/gym_mobile_app" />
|
||||
<option value="$PROJECT_DIR$/gym_watch_app" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveExternalAnnotations" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
|
|
|||
|
|
@ -3,15 +3,19 @@
|
|||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="ComposePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ComposePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ComposePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ComposePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="GlancePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
|
|
@ -35,6 +39,7 @@
|
|||
</inspection_tool>
|
||||
<inspection_tool class="PreviewDeviceShouldUseNewSpec" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
|
|
@ -60,6 +65,10 @@
|
|||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PreviewParameterProviderOnFirstParameter" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="1.9.22" />
|
||||
<option name="version" value="2.0.21" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -11,9 +11,10 @@ buildscript {
|
|||
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
plugins {
|
||||
id 'com.android.application' version '8.9.0' apply false
|
||||
id 'com.android.library' version '8.9.0' apply false
|
||||
id 'com.android.application' version '8.9.1' apply false
|
||||
id 'com.android.library' version '8.9.1' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.9.22' apply false
|
||||
id 'com.google.dagger.hilt.android' version '2.51.1' apply false
|
||||
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.22' apply false
|
||||
id 'org.jetbrains.kotlin.plugin.compose' version '2.0.21' apply false
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'org.british_information_technologies.gym_library'
|
||||
compileSdk 35
|
||||
|
||||
defaultConfig {
|
||||
minSdk 33
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '11'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.16.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation 'com.google.android.material:material:1.12.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package org.british_information_technologies.gym_library
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("org.british_information_technologies.gym_library.test", appContext.packageName)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest>
|
||||
|
||||
</manifest>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.british_information_technologies.gym_log_book.database.converter
|
||||
package org.british_information_technologies.gym_library.database.converter
|
||||
|
||||
import androidx.room.TypeConverter
|
||||
import java.time.LocalDate
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.british_information_technologies.gym_log_book.database.converter
|
||||
package org.british_information_technologies.gym_library.database.converter
|
||||
|
||||
import androidx.room.TypeConverter
|
||||
import org.british_information_technologies.gym_log_book.data_type.EquipmentClass
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.british_information_technologies.gym_log_book.database.converter
|
||||
package org.british_information_technologies.gym_library.database.converter
|
||||
|
||||
import androidx.room.TypeConverter
|
||||
import java.time.LocalTime
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.british_information_technologies.gym_log_book.database.converter
|
||||
package org.british_information_technologies.gym_library.database.converter
|
||||
|
||||
import androidx.room.TypeConverter
|
||||
import java.util.UUID
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package org.british_information_technologies.gym_library
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
/build
|
||||
|
|
@ -4,6 +4,7 @@ plugins {
|
|||
id 'kotlin-kapt'
|
||||
id 'com.google.dagger.hilt.android'
|
||||
id 'org.jetbrains.kotlin.plugin.serialization'
|
||||
id 'org.jetbrains.kotlin.plugin.compose'
|
||||
}
|
||||
|
||||
kapt {
|
||||
|
|
@ -12,12 +13,12 @@ kapt {
|
|||
|
||||
android {
|
||||
namespace 'org.british_information_technologies.gym_log_book'
|
||||
compileSdk 34
|
||||
compileSdk 35
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.british_information_technologies.gym_log_book"
|
||||
minSdk 33
|
||||
targetSdk 34
|
||||
targetSdk 35
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
|
|
@ -61,6 +62,8 @@ android {
|
|||
|
||||
dependencies {
|
||||
|
||||
implementation(project(":gym_library"))
|
||||
|
||||
// reflection
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect:1.9.22"
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
|
@ -16,7 +16,8 @@ import androidx.compose.ui.Alignment
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.sp
|
||||
import org.british_information_technologies.gym_log_book.activity.exercise_set_guide_activity.SetGuideViewModelV2
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.ValidatorTextField
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.text_fields.OutlinedFloatField
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.text_fields.ValidatorTextField
|
||||
import org.british_information_technologies.gym_log_book.lib.validation.Validator
|
||||
|
||||
|
||||
|
|
@ -61,6 +62,12 @@ fun SetPage(
|
|||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
|
||||
OutlinedFloatField(
|
||||
value = weight,
|
||||
onChanged = vm::setWeight,
|
||||
placeholder = "Weight",
|
||||
)
|
||||
|
||||
ValidatorTextField(
|
||||
state = weight,
|
||||
validator = Validator.FloatValidator(),
|
||||
|
|
@ -24,7 +24,7 @@ import androidx.compose.ui.unit.dp
|
|||
import org.british_information_technologies.gym_log_book.activity.main_activity.MainActivityViewModel
|
||||
import org.british_information_technologies.gym_log_book.data_type.EquipmentClass
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.EquipmentClassDropDownSelector
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.ValidatorTextField
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.text_fields.ValidatorTextField
|
||||
import org.british_information_technologies.gym_log_book.lib.navigation.NavLocal
|
||||
import org.british_information_technologies.gym_log_book.lib.validation.Validator
|
||||
import org.british_information_technologies.gym_log_book.theme.Title
|
||||
|
|
@ -26,7 +26,7 @@ import androidx.compose.ui.unit.dp
|
|||
import org.british_information_technologies.gym_log_book.activity.main_activity.MainActivityViewModel
|
||||
import org.british_information_technologies.gym_log_book.data_type.EquipmentClass
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.EquipmentClassDropDownSelector
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.ValidatorTextField
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.text_fields.ValidatorTextField
|
||||
import org.british_information_technologies.gym_log_book.lib.navigation.NavLocal
|
||||
import org.british_information_technologies.gym_log_book.lib.validation.Validator
|
||||
import org.british_information_technologies.gym_log_book.theme.Title
|
||||
|
|
@ -22,7 +22,7 @@ import androidx.compose.ui.Alignment
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.british_information_technologies.gym_log_book.activity.main_activity.MainActivityViewModel
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.ValidatorTextField
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.text_fields.ValidatorTextField
|
||||
import org.british_information_technologies.gym_log_book.lib.navigation.NavLocal
|
||||
import org.british_information_technologies.gym_log_book.lib.validation.Validator
|
||||
import org.british_information_technologies.gym_log_book.theme.Title
|
||||
|
|
@ -23,7 +23,7 @@ import androidx.compose.ui.Alignment
|
|||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.british_information_technologies.gym_log_book.activity.main_activity.MainActivityViewModel
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.ValidatorTextField
|
||||
import org.british_information_technologies.gym_log_book.lib.componenets.text_fields.ValidatorTextField
|
||||
import org.british_information_technologies.gym_log_book.lib.navigation.NavLocal
|
||||
import org.british_information_technologies.gym_log_book.lib.validation.Validator
|
||||
import org.british_information_technologies.gym_log_book.theme.Title
|
||||
|
|
@ -29,14 +29,14 @@ class App : Application() {
|
|||
override fun onTrimMemory(level: Int) {
|
||||
super.onTrimMemory(level)
|
||||
when (level) {
|
||||
TRIM_MEMORY_RUNNING_CRITICAL -> applicationSupervisor.cancelChildren()
|
||||
TRIM_MEMORY_BACKGROUND -> applicationSupervisor.cancelChildren()
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Deprecated in Java")
|
||||
override fun onLowMemory() {
|
||||
super.onLowMemory()
|
||||
|
||||
applicationSupervisor.cancelChildren()
|
||||
}
|
||||
}
|
||||
|
|
@ -13,22 +13,6 @@ import io.github.michael_bailey.android_chat_kit.extension.application.preferenc
|
|||
import kotlinx.coroutines.CoroutineScope
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
/**
|
||||
* This handles all stuff that can be fetched automatically.
|
||||
*/
|
||||
abstract class AbstractAppProvider {
|
||||
|
||||
// @Binds
|
||||
// @Singleton
|
||||
// abstract fun provideDebugPreferences(value: DebugPreferencesManager): DebugPreferencesManager
|
||||
//
|
||||
// @Binds
|
||||
// @Singleton
|
||||
// abstract fun provideNotificationManager(value: DebugPreferencesManager): AppNotificationManager
|
||||
}
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
/**
|
||||
|
|
@ -4,10 +4,6 @@ import androidx.room.AutoMigration
|
|||
import androidx.room.Database
|
||||
import androidx.room.RoomDatabase
|
||||
import androidx.room.TypeConverters
|
||||
import org.british_information_technologies.gym_log_book.database.converter.DateConverter
|
||||
import org.british_information_technologies.gym_log_book.database.converter.EquipmentClassConverter
|
||||
import org.british_information_technologies.gym_log_book.database.converter.TimeConverter
|
||||
import org.british_information_technologies.gym_log_book.database.converter.UUIDConverter
|
||||
import org.british_information_technologies.gym_log_book.database.dao.ExerciseEntryDao
|
||||
import org.british_information_technologies.gym_log_book.database.dao.ExerciseGroupDao
|
||||
import org.british_information_technologies.gym_log_book.database.dao.ExerciseTypeDao
|
||||
|
|
@ -35,10 +31,10 @@ import org.british_information_technologies.gym_log_book.database.entity.EntWeig
|
|||
]
|
||||
)
|
||||
@TypeConverters(
|
||||
DateConverter::class,
|
||||
TimeConverter::class,
|
||||
UUIDConverter::class,
|
||||
EquipmentClassConverter::class,
|
||||
org.british_information_technologies.gym_library.database.converter.DateConverter::class,
|
||||
org.british_information_technologies.gym_library.database.converter.TimeConverter::class,
|
||||
org.british_information_technologies.gym_library.database.converter.UUIDConverter::class,
|
||||
org.british_information_technologies.gym_library.database.converter.EquipmentClassConverter::class,
|
||||
)
|
||||
abstract class AppDatabase : RoomDatabase() {
|
||||
abstract fun exerciseEntryDao(): ExerciseEntryDao
|
||||
|
|
@ -3,9 +3,6 @@ package org.british_information_technologies.gym_log_book.database
|
|||
import androidx.room.Database
|
||||
import androidx.room.RoomDatabase
|
||||
import androidx.room.TypeConverters
|
||||
import org.british_information_technologies.gym_log_book.database.converter.DateConverter
|
||||
import org.british_information_technologies.gym_log_book.database.converter.TimeConverter
|
||||
import org.british_information_technologies.gym_log_book.database.converter.UUIDConverter
|
||||
import org.british_information_technologies.gym_log_book.database.dao.TaskDao
|
||||
import org.british_information_technologies.gym_log_book.database.entity.EntTask
|
||||
|
||||
|
|
@ -17,9 +14,9 @@ import org.british_information_technologies.gym_log_book.database.entity.EntTask
|
|||
exportSchema = true
|
||||
)
|
||||
@TypeConverters(
|
||||
DateConverter::class,
|
||||
TimeConverter::class,
|
||||
UUIDConverter::class
|
||||
org.british_information_technologies.gym_library.database.converter.DateConverter::class,
|
||||
org.british_information_technologies.gym_library.database.converter.TimeConverter::class,
|
||||
org.british_information_technologies.gym_library.database.converter.UUIDConverter::class
|
||||
)
|
||||
abstract class InternalDatabase : RoomDatabase() {
|
||||
abstract fun taskDao(): TaskDao
|
||||
|
|
@ -1,11 +1,18 @@
|
|||
package org.british_information_technologies.gym_log_book.database.dao
|
||||
|
||||
import androidx.room.*
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Delete
|
||||
import androidx.room.Embedded
|
||||
import androidx.room.Insert
|
||||
import androidx.room.Junction
|
||||
import androidx.room.Query
|
||||
import androidx.room.Relation
|
||||
import androidx.room.Update
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.british_information_technologies.gym_log_book.database.edge.EdgeGroupToType
|
||||
import org.british_information_technologies.gym_log_book.database.entity.EntExerciseGroup
|
||||
import org.british_information_technologies.gym_log_book.database.entity.EntExerciseType
|
||||
import java.util.*
|
||||
import java.util.UUID
|
||||
|
||||
@Dao
|
||||
/**
|
||||
|
|
@ -1,10 +1,14 @@
|
|||
package org.british_information_technologies.gym_log_book.database.dao
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.room.*
|
||||
import androidx.room.Dao
|
||||
import androidx.room.Delete
|
||||
import androidx.room.Insert
|
||||
import androidx.room.Query
|
||||
import androidx.room.Update
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.british_information_technologies.gym_log_book.database.entity.EntTask
|
||||
import java.util.*
|
||||
import java.util.UUID
|
||||
|
||||
@Dao
|
||||
/**
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue