Skip to content

Commit 5b55b88

Browse files
authored
Merge pull request #106 from square/charmis/migration_travis_github_Action
Create main.yml
2 parents f542c4f + b627fe9 commit 5b55b88

File tree

67 files changed

+178
-202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+178
-202
lines changed

.github/workflows/main.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: reader-sdk-flutter-plugin
2+
on: [push]
3+
jobs:
4+
install-and-test:
5+
runs-on: macos-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: actions/setup-java@v1
9+
with:
10+
java-version: '12.x'
11+
- uses: subosito/flutter-action@v1
12+
with:
13+
channel: 'stable' # or: 'beta', 'dev' or 'master'
14+
- run: flutter pub get
15+
# Android
16+
- run: |
17+
cd example
18+
flutter pub get
19+
cd android
20+
./gradlew clean build -PSQUARE_READER_SDK_APPLICATION_ID=${{secrets.SQUARE_READER_SDK_APPLICATION_ID}} -PSQUARE_READER_SDK_REPOSITORY_PASSWORD=${{secrets.SQUARE_READER_SDK_REPOSITORY_PASSWORD}}
21+
# #IOS
22+
- run: |
23+
cd example
24+
flutter pub get
25+
cd ios
26+
ruby <(curl https://connect.squareup.com/readersdk-installer) install --app-id ${{secrets.SQUARE_READER_SDK_APPLICATION_ID}} --repo-password ${{secrets.SQUARE_READER_SDK_REPOSITORY_PASSWORD}} --version 1.6.1 > /dev/null
27+
flutter clean
28+
rm Pods && rm Podfile.lock
29+
flutter pub get
30+
pod update Firebase/CoreOnly
31+
pod install --repo-update
32+
xcodebuild -workspace Runner.xcworkspace -configuration Debug -scheme Runner -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14"

.travis.yml

-60
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Flutter plugin for Reader SDK
22

3-
[![Build Status](https://travis-ci.com/square/reader-sdk-flutter-plugin.svg?branch=master)](https://travis-ci.com/square/reader-sdk-flutter-plugin)
3+
[![build](https://github.com/square/reader-sdk-flutter-plugin/actions/workflows/build.yml/badge.svg)](https://github.com/square/reader-sdk-flutter-plugin/actions/workflows/build.yml)
44
[![Pub](https://img.shields.io/pub/v/square_reader_sdk)](https://pub.dev/packages/square_reader_sdk)
55

66
Square [Reader SDK] lets developers embed the [Square] checkout flow and accept

android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Square Inc.
1+
# Copyright 2022 Square Inc.
22

33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/AuthorizeModule.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/CheckoutModule.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/ReaderSettingsModule.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/SquareReaderSdkFlutterPlugin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/StoreCustomerCardModule.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/internal/DateFormatUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/internal/ErrorHandlerUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/internal/converter/CardConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/internal/converter/CheckoutResultConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/internal/converter/LocationConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/internal/converter/MoneyConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/internal/converter/TenderCardDetailsConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/internal/converter/TenderCashDetailsConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

android/src/main/java/com/squareup/sdk/reader/flutter/internal/converter/TenderConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

example/android/app/build.gradle

+8-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,17 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2626
apply plugin: 'kotlin-android'
2727

2828
android {
29-
compileSdkVersion 33
29+
compileSdkVersion 32
3030

3131
lintOptions {
3232
disable 'InvalidPackage'
33+
checkReleaseBuilds false
34+
}
35+
compileSdkVersion 32
36+
ndkVersion = "21.4.7075529"
37+
38+
sourceSets {
39+
main.java.srcDirs += 'src/main/kotlin'
3340
}
3441

3542
defaultConfig {
@@ -48,8 +55,6 @@ android {
4855
// TODO: Add your own signing config for the release build.
4956
// Signing with the debug keys for now, so `flutter run --release` works.
5057
signingConfig signingConfigs.debug
51-
minifyEnabled false
52-
shrinkResources false
5358
}
5459
}
5560

example/android/app/src/main/java/com/example/flutter/squareup/sdk/reader/MainActivity.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

example/android/app/src/main/java/com/example/flutter/squareup/sdk/reader/MainApplication.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

example/android/app/src/main/res/values/colors.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

example/android/app/src/main/res/values/strings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

example/android/app/src/main/res/values/styles.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

example/android/build.gradle

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.6.10'
2+
ext.kotlin_version = '1.6.21'
33

44
repositories {
55
google()
66
mavenCentral()
7+
maven {
8+
url "https://maven.google.com"
9+
}
710
}
811

912
dependencies {
@@ -17,6 +20,10 @@ allprojects {
1720
repositories {
1821
google()
1922
mavenCentral()
23+
maven { url 'https://www.jitpack.io' }
24+
maven {
25+
url "https://maven.google.com"
26+
}
2027
}
2128
}
2229

example/lib/main.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @dart=2.9
22
/*
3-
Copyright 2018 Square Inc.
3+
Copyright 2022 Square Inc.
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.

example/lib/screens/authorize_screen.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

example/lib/screens/checkout_screen.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -195,8 +195,7 @@ class _CheckoutScreenState extends State<CheckoutScreen> {
195195
children: [
196196
Container(
197197
alignment: Alignment.centerRight,
198-
child: SQSettingButton(
199-
onPressed: onSettings),
198+
child: SQSettingButton(onPressed: onSettings),
200199
),
201200
SquareLogo(),
202201
_Description(),

example/lib/screens/manual_authorize_screen.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2018 Square Inc.
2+
Copyright 2022 Square Inc.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)