Skip to content

Commit

Permalink
chore: formatted kotlin files
Browse files Browse the repository at this point in the history
  • Loading branch information
BreX900 committed Nov 19, 2023
1 parent 793eb54 commit 7d65d20
Show file tree
Hide file tree
Showing 16 changed files with 1,115 additions and 675 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/stripe_terminal_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
- name: Analyze code
run: flutter analyze --no-fatal-infos

# Android
- run: ./gradlew spotlessCheck
working-directory: stripe_terminal/android

integration-example:
runs-on: macos-latest
Expand All @@ -45,10 +49,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 +65,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

0 comments on commit 7d65d20

Please sign in to comment.