Skip to content

Commit c4685dc

Browse files
authored
Merge pull request Baseflow#38 from JeroenWeener/enhancement/platform-android
Extract Android implementation to separate folder
2 parents 7bcf1cd + bcc4256 commit c4685dc

20 files changed

+836
-10
lines changed

.github/workflows/google_api_availability.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
# Steps represent a sequence of tasks that will be executed as part of the job
2828
steps:
2929
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
30-
- uses: actions/checkout@v2
30+
- uses: actions/checkout@v3
3131

3232
# Make sure the stable version of Flutter is available
33-
- uses: subosito/flutter-action@v1
33+
- uses: subosito/flutter-action@v2
3434
with:
3535
channel: 'stable'
3636

@@ -53,19 +53,14 @@ jobs:
5353
- name: Run Android build
5454
run: flutter build apk --release
5555
working-directory: ${{env.example-directory}}
56-
57-
# Build iOS version of the example app
58-
- name: Run iOS build
59-
run: flutter build ios --release --no-codesign
60-
working-directory: ${{env.example-directory}}
6156

6257
# Run all unit-tests with code coverage
6358
- name: Run unit tests
6459
run: flutter test --coverage
6560
working-directory: ${{env.source-directory}}
6661

6762
# Upload code coverage information
68-
- uses: codecov/codecov-action@v1
63+
- uses: codecov/codecov-action@v2
6964
with:
7065
file: ${{env.source-directory}}/coverage/lcov.info # optional
7166
name: Google API Availability (App Facing Package) # optional

.github/workflows/google_api_availability_android.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
env:
2525
source-directory: ./google_api_availability_android
26-
example-directory: ./google_api_availability_android/example
26+
example-directory: ./google_api_availability/example
2727

2828
# Steps represent a sequence of tasks that will be executed as part of the job
2929
steps:
@@ -54,4 +54,3 @@ jobs:
5454
- name: Run Android build
5555
run: flutter build apk --release
5656
working-directory: ${{env.example-directory}}
57-
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1.0.0
2+
3+
* Extracts the Android platform implementation from the google_api_availability package.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Baseflow
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# google_api_availability_android
2+
3+
[![style: flutter_lints](https://img.shields.io/badge/style-flutter_lints-40c4ff.svg)](https://pub.dev/packages/flutter_lints)
4+
5+
The official Android implementation of the [`google_api_availability`][1] plugin by Baseflow.
6+
7+
## Usage
8+
9+
This plugin is not yet in use, but will become the endorsed Android implementation later, once `google_api_availability` is updated.
10+
More detailed instructions on using the API can be found in the [README.md][3] of the [`google_api_availability`][1] package.
11+
12+
## Issues
13+
14+
Please file any issues, bugs or feature requests as an issue on our [GitHub](https://github.com/Baseflow/flutter-google-api-availability/issues) page. Commercial support is available, you can contact us at <[email protected]>.
15+
16+
## Want to contribute
17+
18+
If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our [contribution guide](../CONTRIBUTING.md) and send us your [pull request](https://github.com/Baseflow/flutter-google-api-availability/pulls).
19+
20+
## Author
21+
22+
This Google API Availability plugin for Flutter is developed by [Baseflow](https://baseflow.com).
23+
24+
[1]: ../google_api_availability
25+
[2]: lib/google_api_availability_platform_interface.dart
26+
[3]: ../README.md
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
analyzer:
4+
exclude:
5+
# Ignore generated files
6+
- '**/*.g.dart'
7+
- 'lib/src/generated/*.dart'
8+
linter:
9+
rules:
10+
- public_member_api_docs
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
group 'com.baseflow.googleapiavailability'
2+
version '1.0-SNAPSHOT'
3+
4+
buildscript {
5+
repositories {
6+
google()
7+
mavenCentral()
8+
}
9+
10+
dependencies {
11+
classpath 'com.android.tools.build:gradle:4.1.0'
12+
}
13+
}
14+
15+
rootProject.allprojects {
16+
repositories {
17+
google()
18+
mavenCentral()
19+
}
20+
}
21+
22+
apply plugin: 'com.android.library'
23+
24+
android {
25+
compileSdkVersion 31
26+
27+
compileOptions {
28+
sourceCompatibility JavaVersion.VERSION_1_8
29+
targetCompatibility JavaVersion.VERSION_1_8
30+
}
31+
32+
defaultConfig {
33+
minSdkVersion 16
34+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
35+
}
36+
lintOptions {
37+
disable 'InvalidPackage'
38+
}
39+
}
40+
41+
dependencies {
42+
implementation 'com.google.android.gms:play-services-base:18.1.0'
43+
implementation 'androidx.annotation:annotation:1.1.0'
44+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = 'google_api_availability'

0 commit comments

Comments
 (0)