Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#65 project setting #66

Merged
merged 13 commits into from
Dec 25, 2023
23 changes: 6 additions & 17 deletions app-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ plugins {
alias(libs.plugins.suwiki.android.application)
alias(libs.plugins.suwiki.android.application.compose)
alias(libs.plugins.suwiki.android.hilt)
alias(libs.plugins.google.services)
alias(libs.plugins.firebase.crashlytics)
}

android {
Expand All @@ -16,15 +18,7 @@ android {
}

dependencies {
implementation(projects.presentation)

implementation(projects.core.android)
implementation(projects.core.model)
implementation(projects.core.common)
implementation(projects.core.network)
implementation(projects.core.security)
implementation(projects.core.database)
implementation(projects.core.ui)
implementation(projects.feature.navigator)

implementation(projects.remote.openmajor)
implementation(projects.remote.timetable)
Expand All @@ -48,14 +42,9 @@ dependencies {
implementation(projects.data.notice)
implementation(projects.data.signup)

implementation(projects.domain.openmajor)
implementation(projects.domain.user)
implementation(projects.domain.signup)
implementation(projects.domain.lectureevaluation.viewerreporter)
implementation(projects.domain.lectureevaluation.my)
implementation(projects.domain.lectureevaluation.editor)
implementation(projects.domain.timetable)
implementation(projects.domain.notice)
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.crashlytics)
implementation(libs.firebase.analytics)

implementation(libs.timber)
}
26 changes: 15 additions & 11 deletions app-compose/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<application
android:name=".SuwikiApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Uswtimetable">
</application>
<application
android:name=".SuwikiApplication"
android:allowBackup="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Suwiki"
tools:replace="android:allowBackup"
tools:targetApi="s" />

</manifest>
</manifest>
4 changes: 2 additions & 2 deletions app-compose/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">Suwiki-Compose</string>
</resources>
<string name="app_name">SUWIKI</string>
</resources>
17 changes: 17 additions & 0 deletions app-compose/src/main/res/xml/data_extraction_rules.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules>
<cloud-backup>
<exclude domain="root" />
<exclude domain="file" />
<exclude domain="database" />
<exclude domain="sharedpref" />
<exclude domain="external" />
</cloud-backup>
<device-transfer>
<exclude domain="root" />
<exclude domain="file" />
<exclude domain="database" />
<exclude domain="sharedpref" />
<exclude domain="external" />
</device-transfer>
</data-extraction-rules>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import com.kunize.convention.libs
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.project

internal class FeatureComposeConventionPlugin : Plugin<Project> {

Expand All @@ -14,6 +15,14 @@ internal class FeatureComposeConventionPlugin : Plugin<Project> {
}

dependencies {
"implementation"(project(":core:model"))
"implementation"(project(":core:android"))
"implementation"(project(":core:ui"))
"implementation"(project(":core:designsystem"))

"implementation"(libs.findBundle("orbit").get())

"implementation"(libs.findLibrary("kotlinx.immutable").get())
"implementation"(libs.findLibrary("kotlinx.coroutines.android").get())
"implementation"(libs.findLibrary("kotlinx.coroutines.core").get())

Expand Down
22 changes: 22 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

// Top-level build file where you can add configuration options common to all sub-projects/modules.
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.detekt)
alias(libs.plugins.ktlint)
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
Expand All @@ -15,6 +18,8 @@ plugins {
}

allprojects {
val projectPath = rootProject.file(".").absolutePath

apply {
plugin(rootProject.libs.plugins.detekt.get().pluginId)
plugin(rootProject.libs.plugins.ktlint.get().pluginId)
Expand All @@ -28,6 +33,23 @@ allprojects {
config.setFrom(files("$rootDir/detekt-config.yml"))
}
}

tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlin.OptIn",
"-opt-in=kotlin.RequiresOptIn",
)
freeCompilerArgs = freeCompilerArgs + listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$projectPath/report/compose-metrics",
)
freeCompilerArgs = freeCompilerArgs + listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$projectPath/report/compose-reports",
)
}
}
}

buildscript {
Expand Down
7 changes: 7 additions & 0 deletions core/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,10 @@ plugins {
android {
namespace = "com.suwiki.core.android"
}

dependencies {
implementation(projects.core.model)

implementation(platform(libs.firebase.bom))
implementation(libs.firebase.crashlytics)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.suwiki.core.android

import com.google.firebase.crashlytics.ktx.crashlytics
import com.google.firebase.ktx.Firebase
import com.suwiki.core.model.exception.UnknownException

fun throwUnknownException(
e: Throwable,
) {
Firebase.crashlytics.recordException(e)
throw e.message?.let { UnknownException(it) } ?: UnknownException()
}

This file was deleted.

This file was deleted.

Loading