diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..e75fa6ad --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,33 @@ +name: Android CI + +on: + pull_request: + branches: [ "feature**", "hotfix**", "release**", "develop", "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: set up JDK 18 + uses: actions/setup-java@v3 + with: + java-version: '18' + distribution: 'temurin' + cache: gradle + + - name: Cache Gradle Packages + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build diff --git a/.github/workflows/lint_check.yaml b/.github/workflows/lint_check.yaml new file mode 100644 index 00000000..e87c38e1 --- /dev/null +++ b/.github/workflows/lint_check.yaml @@ -0,0 +1,31 @@ +name: Lint Check + +on: pull_request + +jobs: + lint-check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: set up JDK 18 + uses: actions/setup-java@v3 + with: + java-version: '18' + distribution: 'temurin' + cache: gradle + + - name: Cache Gradle Packages + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Lint Check + run: ./gradlew spotlessCheck diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0dcd6a5f..2be32a02 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -40,7 +40,7 @@ android { isShrinkResources = true proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" + "proguard-rules.pro", ) } } @@ -73,8 +73,7 @@ dependencies { implementation(libs.hilt.android) kapt(libs.hilt.compiler) - debugImplementation(libs.flipper) - debugImplementation(libs.soloader) - debugImplementation(libs.flipper.network) - releaseImplementation(libs.noop) -} \ No newline at end of file + implementation(libs.flipper) + implementation(libs.soloader) + implementation(libs.flipper.network) +} diff --git a/app/src/main/java/com/mashup/dorabangs/MyApplication.kt b/app/src/main/java/com/mashup/dorabangs/MyApplication.kt index acb0484d..f8b83c04 100644 --- a/app/src/main/java/com/mashup/dorabangs/MyApplication.kt +++ b/app/src/main/java/com/mashup/dorabangs/MyApplication.kt @@ -23,8 +23,8 @@ class MyApplication : Application() { addPlugin( InspectorFlipperPlugin( this@MyApplication, - DescriptorMapping.withDefaults() - ) + DescriptorMapping.withDefaults(), + ), ) addPlugin(CrashReporterPlugin.getInstance()) // addPlugin(flipperNetworkPlugin) @@ -33,4 +33,4 @@ class MyApplication : Application() { client.start() } } -} \ No newline at end of file +} diff --git a/domain/build.gradle.kts b/domain/build.gradle.kts index 0ec715ca..ae2db9c5 100644 --- a/domain/build.gradle.kts +++ b/domain/build.gradle.kts @@ -23,4 +23,4 @@ tasks.register("dorabangs") { group = "verification" description = "Run tests and generate jacoco report" dependsOn("test", "jacocoTestReport") -} \ No newline at end of file +} diff --git a/domain/src/main/kotlin/SampleUseCase.kt b/domain/src/main/kotlin/SampleUseCase.kt index edb7ffab..b761dc24 100644 --- a/domain/src/main/kotlin/SampleUseCase.kt +++ b/domain/src/main/kotlin/SampleUseCase.kt @@ -6,4 +6,4 @@ class SampleUseCase { println("너는 가짜 바보야") } } -} \ No newline at end of file +} diff --git a/domain/src/test/kotlin/SampleUseCaseTest.kt b/domain/src/test/kotlin/SampleUseCaseTest.kt index 41c0f8ca..b624e126 100644 --- a/domain/src/test/kotlin/SampleUseCaseTest.kt +++ b/domain/src/test/kotlin/SampleUseCaseTest.kt @@ -8,4 +8,4 @@ class SampleUseCaseTest { fun test() { test.baboTest(true) } -} \ No newline at end of file +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2f4eaaff..e6f61007 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -24,7 +24,6 @@ kotlin-serialization = "1.9.22" json-serialization = "1.6.3" flipper = "0.250.0" soloader = "0.10.5" -noop = "0.252.0" [libraries] @@ -46,7 +45,6 @@ appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "a material = { group = "com.google.android.material", name = "material", version.ref = "material" } flipper = { group = "com.facebook.flipper", name = "flipper", version.ref = "flipper" } soloader = { group = "com.facebook.soloader", name = "soloader", version.ref = "soloader" } -noop = { group = "com.facebook.flipper", name = "flipper-noop", version.ref = "flipper" } flipper-network = { group = "com.facebook.flipper", name = "flipper-network-plugin", version.ref = "flipper" } navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "navigation" } diff --git a/presenter/build.gradle.kts b/presenter/build.gradle.kts index 66b49aa2..f1197b80 100644 --- a/presenter/build.gradle.kts +++ b/presenter/build.gradle.kts @@ -22,7 +22,7 @@ android { isMinifyEnabled = true proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" + "proguard-rules.pro", ) } } @@ -67,4 +67,4 @@ dependencies { implementation(libs.hilt.android) kapt(libs.hilt.compiler) implementation(libs.hilt.navigation.compose) -} \ No newline at end of file +} diff --git a/presenter/src/main/java/com/mashup/dorabangs/presenter/MainActivity.kt b/presenter/src/main/java/com/mashup/dorabangs/presenter/MainActivity.kt index 32a875c2..224918fa 100644 --- a/presenter/src/main/java/com/mashup/dorabangs/presenter/MainActivity.kt +++ b/presenter/src/main/java/com/mashup/dorabangs/presenter/MainActivity.kt @@ -12,4 +12,4 @@ class MainActivity : ComponentActivity() { Text("바보야") } } -} \ No newline at end of file +} diff --git a/presenter/src/main/java/com/mashup/dorabangs/presenter/ui/theme/Theme.kt b/presenter/src/main/java/com/mashup/dorabangs/presenter/ui/theme/Theme.kt index a780ed17..6cee303c 100644 --- a/presenter/src/main/java/com/mashup/dorabangs/presenter/ui/theme/Theme.kt +++ b/presenter/src/main/java/com/mashup/dorabangs/presenter/ui/theme/Theme.kt @@ -18,13 +18,13 @@ import androidx.core.view.WindowCompat private val DarkColorScheme = darkColorScheme( primary = Purple80, secondary = PurpleGrey80, - tertiary = Pink80 + tertiary = Pink80, ) private val LightColorScheme = lightColorScheme( primary = Purple40, secondary = PurpleGrey40, - tertiary = Pink40 + tertiary = Pink40, /* Other default colors to override background = Color(0xFFFFFBFE), @@ -34,7 +34,7 @@ private val LightColorScheme = lightColorScheme( onTertiary = Color.White, onBackground = Color(0xFF1C1B1F), onSurface = Color(0xFF1C1B1F), - */ + */ ) @Composable @@ -42,7 +42,7 @@ fun DorabangsTheme( darkTheme: Boolean = isSystemInDarkTheme(), // Dynamic color is available on Android 12+ dynamicColor: Boolean = true, - content: @Composable () -> Unit + content: @Composable () -> Unit, ) { val colorScheme = when { dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { @@ -65,6 +65,6 @@ fun DorabangsTheme( MaterialTheme( colorScheme = colorScheme, typography = Typography, - content = content + content = content, ) } diff --git a/presenter/src/main/java/com/mashup/dorabangs/presenter/ui/theme/Type.kt b/presenter/src/main/java/com/mashup/dorabangs/presenter/ui/theme/Type.kt index c53f4134..9a8c8842 100644 --- a/presenter/src/main/java/com/mashup/dorabangs/presenter/ui/theme/Type.kt +++ b/presenter/src/main/java/com/mashup/dorabangs/presenter/ui/theme/Type.kt @@ -13,8 +13,8 @@ val Typography = Typography( fontWeight = FontWeight.Normal, fontSize = 16.sp, lineHeight = 24.sp, - letterSpacing = 0.5.sp - ) + letterSpacing = 0.5.sp, + ), /* Other default text styles to override titleLarge = TextStyle( fontFamily = FontFamily.Default, @@ -30,5 +30,5 @@ val Typography = Typography( lineHeight = 16.sp, letterSpacing = 0.5.sp ) - */ + */ )