Skip to content

Commit

Permalink
Merge pull request #12 from mash-up-kr/feature/ci
Browse files Browse the repository at this point in the history
[feature] ci 추가
  • Loading branch information
Ahn-seokjoo authored May 16, 2024
2 parents c3fc100 + da7bda7 commit 2ad4873
Show file tree
Hide file tree
Showing 12 changed files with 86 additions and 25 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -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
31 changes: 31 additions & 0 deletions .github/workflows/lint_check.yaml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 5 additions & 6 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ android {
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}
}
Expand Down Expand Up @@ -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)
}
implementation(libs.flipper)
implementation(libs.soloader)
implementation(libs.flipper.network)
}
6 changes: 3 additions & 3 deletions app/src/main/java/com/mashup/dorabangs/MyApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class MyApplication : Application() {
addPlugin(
InspectorFlipperPlugin(
this@MyApplication,
DescriptorMapping.withDefaults()
)
DescriptorMapping.withDefaults(),
),
)
addPlugin(CrashReporterPlugin.getInstance())
// addPlugin(flipperNetworkPlugin)
Expand All @@ -33,4 +33,4 @@ class MyApplication : Application() {
client.start()
}
}
}
}
2 changes: 1 addition & 1 deletion domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ tasks.register("dorabangs") {
group = "verification"
description = "Run tests and generate jacoco report"
dependsOn("test", "jacocoTestReport")
}
}
2 changes: 1 addition & 1 deletion domain/src/main/kotlin/SampleUseCase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ class SampleUseCase {
println("너는 가짜 바보야")
}
}
}
}
2 changes: 1 addition & 1 deletion domain/src/test/kotlin/SampleUseCaseTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ class SampleUseCaseTest {
fun test() {
test.baboTest(true)
}
}
}
2 changes: 0 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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" }

Expand Down
4 changes: 2 additions & 2 deletions presenter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ android {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}
}
Expand Down Expand Up @@ -67,4 +67,4 @@ dependencies {
implementation(libs.hilt.android)
kapt(libs.hilt.compiler)
implementation(libs.hilt.navigation.compose)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ class MainActivity : ComponentActivity() {
Text("바보야")
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -34,15 +34,15 @@ private val LightColorScheme = lightColorScheme(
onTertiary = Color.White,
onBackground = Color(0xFF1C1B1F),
onSurface = Color(0xFF1C1B1F),
*/
*/
)

@Composable
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 -> {
Expand All @@ -65,6 +65,6 @@ fun DorabangsTheme(
MaterialTheme(
colorScheme = colorScheme,
typography = Typography,
content = content
content = content,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -30,5 +30,5 @@ val Typography = Typography(
lineHeight = 16.sp,
letterSpacing = 0.5.sp
)
*/
*/
)

0 comments on commit 2ad4873

Please sign in to comment.