Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Devexp (#2552)
Browse files Browse the repository at this point in the history
* Create a separate "Detekt workflow"

* WIP: Configure dependabot

* Migrate Hilt to Version catalog

* Migrate Room to version catalog

* WIP: Massive legacy code cleanup

* Delete legacy code

* Migrate deps to version catalog

* Cleanup

* Refactor `libs.versions.toml`

* Update the dependabot configuration

* Fix the `dependabot.yml` (attempt #1)

* Fix the `dependabot.yml` (attempt #2)

* Fix the `dependabot.yml` (attempt #3)

* Fix the `dependabot.yml` (attempt #4)

* Fix the `dependabot.yml` (attempt #5)

* Update Deket baseline

* Don't send APK to Telegram if it's `dependabot`

* Bump the dependabot.yml open PRs limit to 10

* Add Gradle caching to the "Detekt" workflow
  • Loading branch information
ILIYANGERMANOV authored Sep 3, 2023
1 parent e688eca commit 9a3ca1c
Show file tree
Hide file tree
Showing 158 changed files with 370 additions and 5,834 deletions.
55 changes: 45 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,52 @@
version: 2

updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "weekly"
registries:
- maven-google
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "weekly"
registries:
- maven-google
open-pull-requests-limit: 10
groups:
kotlin-compose:
patterns:
- "org.jetbrains.kotlin:*"
- "org.jetbrains.kotlinx:*"
- "org.jetbrains.kotlin.plugin.serialization"
- "androidx.compose:*"
- "androidx.glance:*"
- "io.coil-kt:coil-compose"
- "com.android.tools.build:gradle"
- "androidx.activity:activity-compose"
- "androidx.lifecycle:lifecycle-viewmodel-compose"
ktor:
patterns:
- "io.ktor:*"
google-firebase:
patterns:
- "com.google.*"
- "com.android.billingclient:*"
kotest:
patterns:
- "io.kotest.*"
- "io.kotest:*"
androidx:
patterns:
- "androidx.*"
hilt:
patterns:
- "com.google.dagger:*"
- "androidx.hilt:hilt-work"
room:
patterns:
- "androidx.room:*"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10

# This is only a workaround as long as
# https://github.com/dependabot/dependabot-core/pull/7260
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
path: app/build/outputs/apk/demo/app-demo.apk

- name: Upload APK in Telegram Group
if: github.ref == 'refs/heads/main'
if: |
github.ref == 'refs/heads/main' &&
github.event.head_commit.author.name != 'dependabot[bot]'
run: |
COMMIT_LINK="https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"
COMMIT_MESSAGE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${GITHUB_REPOSITORY}/commits/${GITHUB_SHA}" | jq -r .commit.message)
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/detekt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Detekt

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events
push:
branches:
- main

pull_request:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
detekt:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout GIT
uses: actions/checkout@v3

- name: Setup Java SDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '18'
#----------------------------------------------------

#Optimization
- name: Enable Gradle Wrapper caching (optmization)
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
#---------------------------------------------------

#Detekt
- name: Detekt
run: ./gradlew detekt

- name: Upload Detekt Release report to GitHub
if: always()
uses: actions/upload-artifact@v3
with:
name: detekt-report.html
path: build/reports/detekt/detekt.html
#------------------------------------------------------------------
12 changes: 0 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,6 @@ jobs:
${{ runner.os }}-gradle-
#---------------------------------------------------

#Detekt
- name: Detekt
run: ./gradlew detekt

- name: Upload Detekt Release report to GitHub
if: always()
uses: actions/upload-artifact@v3
with:
name: detekt-report.html
path: build/reports/detekt/detekt.html
#------------------------------------------------------------------

#Lint
- name: Lint (release)
run: ./gradlew lintRelease
Expand Down
19 changes: 17 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import com.ivy.wallet.buildsrc.Project
import com.ivy.wallet.buildsrc.appModuleDependencies

plugins {
id("com.android.application")
Expand Down Expand Up @@ -140,7 +139,6 @@ android {
}

dependencies {
appModuleDependencies()
implementation(project(":ivy-design"))

implementation(libs.ivy.frp.temp)
Expand All @@ -156,6 +154,23 @@ dependencies {
implementation(libs.androidx.security)
implementation(libs.androidx.biometrics)

implementation(libs.gson)

implementation(libs.bundles.hilt)
kapt(libs.hilt.compiler)

implementation(libs.bundles.room)
kapt(libs.room.compiler)

implementation(libs.timber)
implementation(libs.eventbus)
implementation(libs.keval)
implementation(libs.bundles.opencsv)
implementation(libs.androidx.work)
implementation(libs.androidx.recyclerview)

testImplementation(libs.bundles.kotest)
testImplementation(libs.bundles.kotlin.test)
testImplementation(libs.hilt.testing)
testImplementation(libs.androidx.work.testing)
}
Loading

0 comments on commit 9a3ca1c

Please sign in to comment.