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

added all the missing KMP dependencies in version catalog #2282

Merged
merged 5 commits into from
Jan 10, 2025
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
3 changes: 2 additions & 1 deletion .github/workflows/pr-check-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ name: PR Checks
on:
push:
branches: [ dev ] # Runs on pushes to dev branch
pull_request: # Runs on all pull requests
pull_request:
branches: [ dev ] # Runs on pull requests to dev branch
workflow_dispatch: # Allows manual triggering of the workflow

# Concurrency settings to prevent multiple simultaneous workflow runs
Expand Down
106 changes: 106 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Workflow for kmp branch

on:
workflow_dispatch:
pull_request:
branches:
- 'kmp-impl'
push:
branches:
- 'kmp-impl'

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write

jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- uses: gradle/actions/setup-gradle@v4

- name: Cache Gradle and build outputs
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
build
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-

checks:
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
check: [ build_logic, spotless, detekt ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Run ${{ matrix.check }}
id: run_check
run: |
if [ "${{ matrix.check }}" = "build_logic" ]; then
./gradlew check -p build-logic
elif [ "${{ matrix.check }}" = "spotless" ]; then
./gradlew spotlessCheck --no-configuration-cache --no-daemon
elif [ "${{ matrix.check }}" = "detekt" ]; then
./gradlew detekt
fi

- name: Upload Detekt Reports
if: ${{ matrix.check == 'detekt' && steps.run_check.outcome == 'success' }}
uses: actions/upload-artifact@v4
with:
name: detekt-reports
path: |
**/build/reports/detekt/detekt.md

dependency_guard:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17

- name: Check Dependency Guard
id: dependencyguard_verify
continue-on-error: true
run: ./gradlew dependencyGuard

- name: Prevent updating Dependency Guard baselines if this is a fork
id: checkfork_dependencyguard
if: steps.dependencyguard_verify.outcome == 'failure' && github.event.pull_request.head.repo.full_name != github.repository
run: |
echo "::error::Dependency Guard failed, please update baselines with: ./gradlew dependencyGuardBaseline" && exit 1

# Runs if previous job failed
- name: Generate new Dependency Guard baselines if verification failed and it's a PR
id: dependencyguard_baseline
if: steps.dependencyguard_verify.outcome == 'failure' && github.event_name == 'pull_request'
run: |
./gradlew dependencyGuardBaseline

- name: Push new Dependency Guard baselines if available
uses: stefanzweifel/git-auto-commit-action@v5
if: steps.dependencyguard_baseline.outcome == 'success'
with:
file_pattern: '**/dependencies/*.txt'
disable_globbing: true
commit_message: "🤖 Updates baselines for Dependency Guard"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ android-client.iml
mifosng-android/mifosng-android.iml
*.hprof
android-client.iml
/secrets.properties
/secrets.properties
.kotlin/
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ internal fun Project.configureAndroidCompose(
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs += buildComposeMetricsParameters()
freeCompilerArgs += stabilityConfiguration()
freeCompilerArgs += strongSkippingConfiguration()
compilerOptions {
freeCompilerArgs.addAll(buildComposeMetricsParameters())
freeCompilerArgs.addAll(stabilityConfiguration())
freeCompilerArgs.addAll(strongSkippingConfiguration())
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import com.android.build.api.dsl.CommonExtension
import org.gradle.api.JavaVersion
import org.gradle.api.Project
import org.gradle.api.plugins.JavaPluginExtension
import org.gradle.kotlin.dsl.assign
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.provideDelegate
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

/**
Expand All @@ -17,7 +19,7 @@ internal fun Project.configureKotlinAndroid(
commonExtension: CommonExtension<*, *, *, *, *, *>,
) {
commonExtension.apply {
compileSdk = 34
compileSdk = 35

defaultConfig {
minSdk = 26
Expand All @@ -28,6 +30,7 @@ internal fun Project.configureKotlinAndroid(
// https://developer.android.com/studio/write/java11-minimal-support-table
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
isCoreLibraryDesugaringEnabled = true
}
}

Expand Down Expand Up @@ -58,17 +61,17 @@ internal fun Project.configureKotlinJvm() {
private fun Project.configureKotlin() {
// Use withType to workaround https://youtrack.jetbrains.com/issue/KT-55947
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
// Set JVM target to 11
jvmTarget = JavaVersion.VERSION_17.toString()
compilerOptions {
// Set JVM target to 17
jvmTarget = JvmTarget.JVM_17
// Treat all Kotlin warnings as errors (disabled by default)
// Override by setting warningsAsErrors=true in your ~/.gradle/gradle.properties
val warningsAsErrors: String? by project
allWarningsAsErrors = warningsAsErrors.toBoolean()
freeCompilerArgs = freeCompilerArgs + listOf(
freeCompilerArgs.add(
// Enable experimental coroutines APIs, including Flow
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
)
}
}
}
}
168 changes: 0 additions & 168 deletions config/quality/checkstyle/checkstyle-config.xml

This file was deleted.

Loading
Loading