Skip to content

Commit

Permalink
Release v1.3.9
Browse files Browse the repository at this point in the history
Release v1.3.9
  • Loading branch information
parkuiery authored Sep 13, 2024
2 parents 9af0beb + a33c5b6 commit aeabf38
Show file tree
Hide file tree
Showing 194 changed files with 823 additions and 689 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
root = true

[*.{kt,kts}]
insert_final_newline = true
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ jobs:

- name: Run test
run: ./gradlew test

- name: Check Ktlint
run: ./gradlew ktlintCheck
21 changes: 14 additions & 7 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,38 @@ plugins {
alias(libs.plugins.hilt)
alias(libs.plugins.ksp)
alias(libs.plugins.firebase.crashlytics)
alias(libs.plugins.ktlint.gradle)
}

android {
namespace = "team.aliens.dms.android.app"
compileSdk = libs.versions.compileSdk.get().toInt()
compileSdk = ProjectProperties.COMPILE_SDK

defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()
targetSdk = libs.versions.targetSdk.get().toInt()
minSdk = ProjectProperties.MIN_SDK
targetSdk = ProjectProperties.TARGET_SDK

versionCode = 17
versionName = "1.3.8"
versionCode = ProjectProperties.VERSION_CODE
versionName = ProjectProperties.VERSION_NAME

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = false

isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
debug {
splits.abi.isEnable = false
aaptOptions.cruncherEnabled = false
splits.density.isEnable = false
aaptOptions.cruncherEnabled = false
}
}

buildFeatures {
Expand Down
74 changes: 73 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,76 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

# keep everything in this package from being removed or renamed
-keep class team.** { *; }

# keep everything in this package from being renamed only
-keepnames class team.** { *; }
# Add *one* of the following rules to your Proguard configuration file.
# Alternatively, you can annotate classes and class members with @androidx.annotation.Keep

# keep everything in this package from being removed or renamed
-keep class okhttp3.** { *; }

# keep everything in this package from being renamed only
-keepnames class okhttp3.** { *; }
# Add *one* of the following rules to your Proguard configuration file.
# Alternatively, you can annotate classes and class members with @androidx.annotation.Keep

# keep everything in this package from being removed or renamed
-keep class kotlin.** { *; }

# keep everything in this package from being renamed only
-keepnames class kotlin.** { *; }
# Add *one* of the following rules to your Proguard configuration file.
# Alternatively, you can annotate classes and class members with @androidx.annotation.Keep

# keep everything in this package from being removed or renamed
-keep class okio.** { *; }

# keep everything in this package from being renamed only
-keepnames class okio.** { *; }
# Add *one* of the following rules to your Proguard configuration file.
# Alternatively, you can annotate classes and class members with @androidx.annotation.Keep

# keep everything in this package from being removed or renamed
-keep class java.** { *; }

# keep everything in this package from being renamed only
-keepnames class java.** { *; }
# Add *one* of the following rules to your Proguard configuration file.
# Alternatively, you can annotate classes and class members with @androidx.annotation.Keep

# keep everything in this package from being removed or renamed
-keep class retrofit2.** { *; }

# keep everything in this package from being renamed only
-keepnames class retrofit2.** { *; }
# Add *one* of the following rules to your Proguard configuration file.
# Alternatively, you can annotate classes and class members with @androidx.annotation.Keep

# keep everything in this package from being removed or renamed
-keep class org.** { *; }

# keep everything in this package from being renamed only
-keepnames class org.** { *; }
# Add *one* of the following rules to your Proguard configuration file.
# Alternatively, you can annotate classes and class members with @androidx.annotation.Keep

# keep everything in this package from being removed or renamed
-keep class javax.** { *; }

# keep everything in this package from being renamed only
-keepnames class javax.** { *; }
# Add *one* of the following rules to your Proguard configuration file.
# Alternatively, you can annotate classes and class members with @androidx.annotation.Keep

# keep everything in this package from being removed or renamed
-keep class _COROUTINE.** { *; }

# keep everything in this package from being renamed only
-keepnames class _COROUTINE.** { *; }

-dontwarn com.google.devtools.ksp.processing.SymbolProcessorProvider
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package team.aliens.dms.android.app

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import androidx.test.platform.app.InstrumentationRegistry
import junit.framework.TestCase.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
Expand All @@ -21,4 +19,4 @@ class ExampleInstrumentedTest {
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("team.aliens.dms_android.app.test", appContext.packageName)
}
}
}
9 changes: 6 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,15 @@
</intent-filter>
</service>
<meta-data
android:name="om.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_logo_image"/>
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_notification"/>
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/default_notification_channel_id" />

<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/primary" />

<receiver
android:name="team.aliens.dms.android.core.widget.meal.MealWidgetReceiver"
android:label="@string/today_meal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class DmsAppState(

val capabilities = cm?.getNetworkCapabilities(cm.activeNetwork) ?: return false
return capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) && capabilities.hasCapability(
NetworkCapabilities.NET_CAPABILITY_VALIDATED
NetworkCapabilities.NET_CAPABILITY_VALIDATED,
)
}

Expand Down
2 changes: 0 additions & 2 deletions app/src/main/java/team/aliens/dms/android/app/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import com.google.android.play.core.appupdate.AppUpdateManagerFactory
import com.google.android.play.core.install.model.AppUpdateType
import com.google.android.play.core.install.model.UpdateAvailability
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
import team.aliens.dms.android.core.designsystem.DmsTheme
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package team.aliens.dms.android.app.di.network

import team.aliens.dms.android.network.BuildConfig as NetworkBuildConfig
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand All @@ -18,6 +17,7 @@ import team.aliens.dms.android.core.network.httpclient.DefaultInterceptors
import team.aliens.dms.android.core.network.httpclient.GlobalInterceptors
import team.aliens.dms.android.core.school.FeaturesFetchingUrl
import javax.inject.Singleton
import team.aliens.dms.android.network.BuildConfig as NetworkBuildConfig

@Module
@InstallIn(SingletonComponent::class)
Expand Down Expand Up @@ -110,7 +110,7 @@ object NetworkConfigModule {
HttpRequest(
method = HttpMethod.GET,
path = "/files/url",
)
),
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import team.aliens.dms.android.feature.destinations.StudyRoomDetailsScreenDestin
import team.aliens.dms.android.feature.destinations.StudyRoomListScreenDestination
import team.aliens.dms.android.feature.destinations.TermsScreenDestination
import team.aliens.dms.android.feature.editpassword.navigation.EditPasswordNavGraph
import team.aliens.dms.android.feature.notification.navigation.NotificationSettingsNavigator
import team.aliens.dms.android.feature.outing.navigation.OutingNavGraph
import team.aliens.dms.android.feature.resetpassword.navigation.ResetPasswordNavGraph
import team.aliens.dms.android.feature.signup.navigation.SignUpNavGraph
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package team.aliens.dms.android.app.navigation.unauthorized

import com.ramcosta.composedestinations.dynamic.routedIn
import com.ramcosta.composedestinations.dynamic.within
import com.ramcosta.composedestinations.spec.DestinationSpec
import com.ramcosta.composedestinations.spec.NavGraphSpec
import com.ramcosta.composedestinations.spec.Route
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import team.aliens.dms.android.core.notification.DeviceTokenManager
import team.aliens.dms.android.app.NotificationManager
import team.aliens.dms.android.core.notification.NotificationManager
import javax.inject.Inject

@AndroidEntryPoint
Expand All @@ -19,7 +19,7 @@ class DmsMessagingService : FirebaseMessagingService() {
private val notificationManager: NotificationManager by lazy {
NotificationManager(context = this)
}

override fun onNewToken(deviceToken: String) {
super.onNewToken(deviceToken)
CoroutineScope(Dispatchers.IO).launch {
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary">#3d8aff</color>
</resources>
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package team.aliens.dms.android.app

import junit.framework.TestCase.assertEquals
import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
Expand All @@ -14,4 +13,4 @@ class ExampleUnitTest {
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
}
7 changes: 7 additions & 0 deletions buildSrc/src/main/kotlin/ProjectProperties.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
object ProjectProperties {
const val COMPILE_SDK = 34
const val MIN_SDK = 23
const val TARGET_SDK = 34
const val VERSION_CODE = 18
const val VERSION_NAME = "1.3.9"
}
1 change: 1 addition & 0 deletions core/database/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
alias(libs.plugins.kotlin.android)
alias(libs.plugins.hilt)
alias(libs.plugins.ksp)
alias(libs.plugins.ktlint.gradle)
}

android {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package team.aliens.dms.android.core.database

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import androidx.test.platform.app.InstrumentationRegistry
import junit.framework.TestCase.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
Expand All @@ -21,4 +19,4 @@ class ExampleInstrumentedTest {
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("team.aliens.dms_android.database.test", appContext.packageName)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class NoticeDao {
"""
SELECT *
FROM tbl_notices;
"""
""",
)
abstract fun findAll(): List<NoticeEntity>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import org.threeten.bp.LocalDate

@Entity(tableName = "tbl_meals")
data class MealEntity(
@PrimaryKey @ColumnInfo("date") val date: LocalDate,
@PrimaryKey
@ColumnInfo("date")
val date: LocalDate,
@ColumnInfo(name = "breakfast") val breakfast: List<String>,
@ColumnInfo(name = "kcal_breakfast") val kcalOfBreakfast: String?,
@ColumnInfo(name = "lunch") val lunch: List<String>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import java.util.UUID

@Entity(tableName = "tbl_notices")
data class NoticeEntity(
@PrimaryKey @ColumnInfo(name = "id") val id: UUID,
@PrimaryKey
@ColumnInfo(name = "id")
val id: UUID,
@ColumnInfo(name = "title") val title: String,
@ColumnInfo(name = "content") val content: String?,
@ColumnInfo(name = "created_at") val createdAt: LocalDateTime,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package team.aliens.dms.android.core.database

import junit.framework.TestCase.assertEquals
import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
Expand All @@ -14,4 +13,4 @@ class ExampleUnitTest {
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
}
1 change: 1 addition & 0 deletions core/datastore/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
alias(libs.plugins.kotlin.android)
alias(libs.plugins.hilt)
alias(libs.plugins.ksp)
alias(libs.plugins.ktlint.gradle)
}

android {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package team.aliens.dms.android.core.datastore

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import androidx.test.platform.app.InstrumentationRegistry
import junit.framework.TestCase.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
Expand All @@ -21,4 +19,4 @@ class ExampleInstrumentedTest {
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("team.aliens.dms_android.core.datastore.test", appContext.packageName)
}
}
}
Loading

0 comments on commit aeabf38

Please sign in to comment.