Skip to content

Commit

Permalink
Merge pull request #36 from junjange/chore/and_setting
Browse files Browse the repository at this point in the history
CI 및 Gradle 수정
  • Loading branch information
junjange authored Jul 11, 2024
2 parents ba8f7e0 + d94d2d9 commit ce41e55
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/android-pull-request-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Android Pull Request CI
on:
push:
branches: [ develop ]
paths:
- 'android/**'
pull_request:
branches: [ develop ]
paths:
Expand Down Expand Up @@ -42,6 +44,9 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Lint Check
run: ./gradlew ktlintCheck

- name: Run unit tests
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {

defaultConfig {
applicationId = "com.woowacourse.friendogly"
minSdk = 24
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "1.0"
Expand All @@ -23,7 +23,7 @@ android {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package com.woowacourse.friendogly

import androidx.test.platform.app.InstrumentationRegistry
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

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package com.woowacourse.friendogly.data

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package com.woowacourse.friendogly.data

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ abstract class BaseFragment<T : ViewDataBinding>(
container: ViewGroup?,
savedInstanceState: Bundle?,
): View {
_binding = DataBindingUtil.inflate<T>(inflater, layoutResourceId, container, false).apply {
lifecycleOwner = viewLifecycleOwner
}
_binding =
DataBindingUtil.inflate<T>(inflater, layoutResourceId, container, false).apply {
lifecycleOwner = viewLifecycleOwner
}
return binding.root
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package com.woowacourse.friendogly.data

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.woowacourse.friendogly

import org.junit.Assert.assertEquals
import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
Expand Down
5 changes: 5 additions & 0 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.jetbrainsKotlinAndroid) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.ktlint) apply false
}

allprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
}
5 changes: 5 additions & 0 deletions android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ junit-jupiter = "5.10.2"
assertj-core = "3.25.3"
kotest-runner-junit5 = "5.8.0"
mockk = "1.13.10"
ktlint = "12.1.0"

# android-library
datastore = "1.1.1"
Expand Down Expand Up @@ -89,6 +90,9 @@ retrofit-core = { group = "com.squareup.retrofit2", name = "retrofit", version.r
okhttp-core = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" }
okhttp-logging-interceptor = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" }

#ktlint
ktlint-gradle = { module = "org.jlleitschuh.gradle:ktlint-gradle", version.ref = "ktlint" }

[bundles]
kotlin = ["lifecycle-runtime-ktx", "lifecycle-extensions", "coroutines-core"]
android = ["androidx-constraintlayout", "androidx-activity", "androidx-appcompat", "androidx-core-ktx", "material", "image-cropper", "glide", "paging-runtime-ktx"]
Expand All @@ -103,3 +107,4 @@ test = ["junit", "junit-jupiter", "assertj", "kotest", "mockk"]
androidApplication = { id = "com.android.application", version.ref = "agp" }
jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
android-library = { id = "com.android.library", version.ref = "agp" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }

0 comments on commit ce41e55

Please sign in to comment.