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

chore: formatted kotlin files #41

Merged
merged 1 commit into from
Nov 19, 2023
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
17 changes: 13 additions & 4 deletions .github/workflows/stripe_terminal_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ jobs:

- name: Analyze code
run: flutter analyze --no-fatal-infos

# Android
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
- run: ./gradlew spotlessCheck
working-directory: stripe_terminal/android

integration-example:
runs-on: macos-latest
Expand All @@ -45,10 +53,6 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: setup-cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
podfile-path: stripe_terminal/example/ios/Podfile.lock
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.x'
Expand All @@ -65,4 +69,9 @@ jobs:
- name: Analyze code
run: flutter analyze --no-fatal-infos

# IOS
- uses: maxim-lobanov/setup-cocoapods@v1
with:
podfile-path: stripe_terminal/example/ios/Podfile.lock

- run: pod install --deployment --project-directory=ios
3 changes: 3 additions & 0 deletions stripe_terminal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,6 @@ Much code in this plugin is auto generated:
- [one_for_all](https://pub.dev/packages/one_for_all) is used to generate the code for communication between platforms.
Run this [script](tool/generate_api.dart)
- [index_generator](https://pub.dev/packages/index_generator) is used to generate library exports
### Android
Format code with `./gradlew spotlessApply`
17 changes: 14 additions & 3 deletions stripe_terminal/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
group 'packages.mek'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.7.10'
repositories {
Expand All @@ -14,6 +11,13 @@ buildscript {
}
}

plugins {
id "com.diffplug.spotless" version "6.22.0"
}

group 'packages.mek'
version '1.0-SNAPSHOT'

allprojects {
repositories {
google()
Expand Down Expand Up @@ -68,4 +72,11 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
api "com.stripe:stripeterminal-localmobile:3.2.0"
api "com.stripe:stripeterminal-core:3.2.0"
}

spotless {
kotlin {
target("**/*.kt")
ktlint("1.0.1")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package mek.stripeterminal

fun <K, V> Map<K, V>.toHashMap(): HashMap<K, V> {
return hashMapOf(*map { (k, v) -> k to v }.toTypedArray())
}
}
Loading