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

Remove Guava dependency #129

Merged
merged 11 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .danger/pr_detekt.df.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@file:DependsOn("io.github.vacxe.danger.kotlin:detekt:1.1.0")

import systems.danger.kotlin.*
import systems.danger.kotlin.models.github.*
import io.github.vacxe.danger.kotlin.detekt.*
import java.io.File

val detektPlugin = DetektPlugin { it.removePrefix("/home/runner/work/Kakao/Kakao/") }
register.plugin(detektPlugin)

danger(args) {
detektReport()
}

fun detektReport() {
val detektReportFile = File("build/reports/detekt/detekt.xml")
if (!detektReportFile.exists()) {
warn(
"Detekt report not exist",
)
} else {
detektPlugin.parseAndReport(detektReportFile)
}
}
17 changes: 17 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,24 @@ jobs:
with:
distribution: "temurin"
java-version: 17
cache: gradle
- name: detekt
run: |
./gradlew clean detekt
- name: Upload Detekt Artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: detektArtifacts
path: build/reports/detekt
- name: Danger
uses: danger/[email protected]
if: always()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
dangerfile: ".danger/pr_detekt.df.kts"
args: "--failOnErrors --no-publish-check"

assemble-debug-apk:
needs: [ detekt ]
Expand All @@ -26,6 +41,7 @@ jobs:
with:
distribution: "temurin"
java-version: 17
cache: gradle
- name: Assemble Debug APK
run: bash ./gradlew sample:assembleDebug
- name: Upload app APK
Expand All @@ -45,6 +61,7 @@ jobs:
with:
distribution: "temurin"
java-version: 17
cache: gradle
- name: Assemble Instrumental APK
run: bash ./gradlew sample:assembleDebugAndroidTest
- name: Upload app APK
Expand Down
4 changes: 4 additions & 0 deletions buildSrc/src/main/kotlin/convention.library.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ plugins {
id("convention.android-base")
id("convention.kotlin")
}

kotlin {
jvmToolchain(8)
}
28 changes: 14 additions & 14 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
[versions]
gradle = "8.5"
jvmVersion = "17"
gradle = "8.8"
jvmVersion = "8"

targetSdk = "34"
compileSdk = "34"
minSdk = "14"
minSdk = "21"

agpVersion = "8.2.1"
kotlinVersion = "1.9.21"
agpVersion = "8.5.0"
kotlinVersion = "2.0.0"

dokkaVersion = "1.9.10"
appcompatVersion = "1.6.1"
dokkaVersion = "1.9.20"
appcompatVersion = "1.7.0"
recyclerviewVersion = "1.3.2"
viewPager2Version = "1.0.0"
viewPager2Version = "1.1.0"
swiperefreshlayoutVersion = "1.1.0"
annotationVersion = "1.3.0"
testRunnerVersion = "1.5.2"
testRulesVersion = "1.5.0"
annotationVersion = "1.6.0"
testRunnerVersion = "1.6.1"
testRulesVersion = "1.6.1"

espressoVersion = "3.5.1"
espressoVersion = "3.6.1"

junitVersion = "4.13.2"
junitExtVersion = "1.1.5"
junitExtVersion = "1.2.1"
multidexVersion = "2.0.1"
materialVersion = "1.11.0"
materialVersion = "1.12.0"

detekt = "1.17.1"

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import org.hamcrest.Matchers
* @param T Type of your custom view. Needs to be defined to enable invoke() and perform() for descendants
*/
@KakaoDslMarker
open class KBaseView<T> : KDSLView<T>, BaseActions, BaseAssertions, Interceptable<ViewInteraction, ViewAssertion, ViewAction> {
override val view: ViewInteractionDelegate
abstract class KBaseView<T> : KDSLView<T>, BaseActions, BaseAssertions, Interceptable<ViewInteraction, ViewAssertion, ViewAction> {
final override val view: ViewInteractionDelegate
override var root: Matcher<Root> = RootMatchers.DEFAULT

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import android.util.Log
import androidx.test.espresso.UiController
import androidx.test.espresso.action.MotionEvents
import androidx.test.espresso.action.Swiper
import androidx.test.espresso.core.internal.deps.guava.base.Preconditions.checkElementIndex

object PreciseSwipe : Swiper {
override fun sendSwipe(
Expand Down Expand Up @@ -53,8 +52,8 @@ object PreciseSwipe : Swiper {
}

private fun interpolate(start: FloatArray, end: FloatArray, steps: Int): Array<FloatArray> {
checkElementIndex(1, start.size)
checkElementIndex(1, end.size)
require(1 in start.indices)
require(1 in end.indices)

val res = Array(steps) { FloatArray(2) }

Expand Down
2 changes: 1 addition & 1 deletion kakao/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.5.1
3.6.1