Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
aa465b2
fix tab bar
soeren-schmaljohann-2denker Nov 29, 2023
e0f2dd4
fix fonts
soeren-schmaljohann-2denker Nov 29, 2023
822bc89
fix fab
soeren-schmaljohann-2denker Nov 29, 2023
cd73d16
disable mat 3
soeren-schmaljohann-2denker Nov 29, 2023
0a46254
fix goldens
soeren-schmaljohann-2denker Nov 29, 2023
d07a40a
make the current authentication token accessible
christian2denker Feb 24, 2024
eeb6bae
prepare release
christian2denker Feb 24, 2024
f6c6d29
check mounted after async call safely
christian2denker Feb 24, 2024
c153458
make svgLoader setable to pass a mock. move pictureProvider to Factor…
christian2denker Feb 25, 2024
d274967
add tests for factory
christian2denker Feb 25, 2024
ac66b41
mock svg network loader in tests
christian2denker Feb 25, 2024
5c8df34
upgrade flutter_svg
christian2denker Feb 25, 2024
8f89f56
formating
christian2denker Feb 25, 2024
ff73e32
access token via authenticator only
christian2denker Feb 25, 2024
ee9dd31
add more tests
christian2denker Feb 26, 2024
c7af69d
upgrade android
soeren-schmaljohann-2denker Feb 27, 2024
930ee1a
upgrade gradle
soeren-schmaljohann-2denker Feb 27, 2024
40c85ec
dependecy intl to 0.19.0, MaterialState to WidgetState
christian2denker Oct 30, 2024
bf901cf
fix deprecated methods in form tests, update dry run publish to use f…
gmeral Oct 31, 2024
d0ef811
fix remaining warnings
gmeral Oct 31, 2024
9adc68d
fix deprecated warnings, update goldens
gmeral Oct 31, 2024
d3791be
merging Make-auth-token-accessible
gmeral Oct 31, 2024
4895a45
fix geolocation_form_widget test
gmeral Oct 31, 2024
4e0f7ec
format
gmeral Oct 31, 2024
74e5d24
stay on material 2
christian2denker Nov 3, 2024
908e55f
set background colors
christian2denker Nov 3, 2024
f57c5d0
update progress indicator test
christian2denker Nov 3, 2024
bd6a6f0
update google maps, ios build target ios 14.0
christian2denker Nov 3, 2024
315e97d
set ios version to 14
christian2denker Nov 4, 2024
11fb24b
format pod file
christian2denker Nov 4, 2024
125d65d
adding flutter doctor for troubleshooting
gmeral Nov 12, 2024
5f0fafb
use a fixed flutter version
gmeral Nov 12, 2024
cc32584
try with flutter version 3.22.3
gmeral Nov 12, 2024
71e495a
upgrading gradle to 8
gmeral Nov 12, 2024
827d58f
adding java 17
gmeral Nov 12, 2024
40f0dba
Revert "adding java 17"
gmeral Nov 12, 2024
17aea07
Revert "upgrading gradle to 8"
gmeral Nov 12, 2024
c949e09
Use gradle hack from flutter team to solve compiledSdkVersion in depe…
gmeral Nov 12, 2024
045274f
Using java 17
gmeral Nov 12, 2024
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
13 changes: 13 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.24.4
- uses: bluefireteam/melos-action@v1

- name: Format, Lint, Publishability
Expand Down Expand Up @@ -57,7 +60,14 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.24.4
- uses: bluefireteam/melos-action@v1

- name: Build Android Examples
Expand All @@ -71,6 +81,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.24.4
- uses: bluefireteam/melos-action@v1

- name: Build iOS Examples
Expand Down
6 changes: 3 additions & 3 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ scripts:

lint:all:
run: |
melos run lint:analyze && melos publish -y && melos run lint:format
melos run lint:analyze && melos lint:pub && melos run lint:format

lint:analyze:
run: |
Expand All @@ -17,7 +17,7 @@ scripts:
lint:pub:
run: |
melos exec -c 5 -- \
"dart pub publish --dry-run"
"flutter pub publish --dry-run"
packageFilters:
ignore: "*example*"
noPrivate: true
Expand Down Expand Up @@ -100,7 +100,7 @@ scripts:

build:android:
run: |
melos run build:example_android_pub --no-select && melos bootstrap
flutter doctor -v && melos run build:example_android_pub --no-select && melos bootstrap

# melos bootstrap does not generate all files generated by a build that runs
# `pub get`, and `flutter drive` does not either, so it is still necessary to
Expand Down
4 changes: 4 additions & 0 deletions packages/apptive_grid_core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.2

- **FEAT**: Make the current authentication token accessible

## 2.1.1

- **REFACTOR**: Use performApptiveLink for Client Functions (#129).
Expand Down
25 changes: 9 additions & 16 deletions packages/apptive_grid_core/example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,21 +22,17 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdkVersion 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
applicationId "de.zweidenker.example"
minSdkVersion 18
targetSdkVersion 33
minSdkVersion flutter.minSdkVersion
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand All @@ -51,7 +48,3 @@ android {
flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
34 changes: 20 additions & 14 deletions packages/apptive_grid_core/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
buildscript {
ext.kotlin_version = '1.8.0'
repositories {
google()
mavenCentral()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand All @@ -22,6 +8,26 @@ allprojects {

rootProject.buildDir = '../build'
subprojects {
afterEvaluate { project ->
if (project.extensions.findByName("android") != null) {
Integer pluginCompileSdk = project.android.compileSdk
if (pluginCompileSdk != null && pluginCompileSdk < 31) {
project.logger.error(
"Warning: Overriding compileSdk version in Flutter plugin: "
+ project.name
+ " from "
+ pluginCompileSdk
+ " to 31 (to work around https://issuetracker.google.com/issues/199180389)."
+ "\nIf there is not a new version of " + project.name + ", consider filing an issue against "
+ project.name
+ " to increase their compileSdk to the latest (otherwise try updating to the latest version)."
)
project.android {
compileSdk 31
}
}
}
}
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
Expand Down
31 changes: 23 additions & 8 deletions packages/apptive_grid_core/example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.4.2" apply false
id "org.jetbrains.kotlin.android" version "1.8.0" apply false
}

include ":app"
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion packages/apptive_grid_core/example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
platform :ios, '14.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
12 changes: 6 additions & 6 deletions packages/apptive_grid_core/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe

PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
PODFILE CHECKSUM: fe5e039928e08cc3aa55730590fe5577354d32d2

COCOAPODS: 1.13.0
COCOAPODS: 1.15.2
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -343,7 +343,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -417,7 +417,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -466,7 +466,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
5 changes: 4 additions & 1 deletion packages/apptive_grid_core/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ void main() async {
),
);
await enableWebAuth(options);
runApp(ApptiveGrid(options: options, child: MyApp()));
runApp(const ApptiveGrid(options: options, child: MyApp()));
}

/// You can access the ApptiveGridClient via ApptiveGrid.getClient()
class MyApp extends StatefulWidget {
/// A widget that demonstrates ApptiveGrid functionality
const MyApp({super.key});

@override
State<MyApp> createState() => _MyAppState();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@ class ApptiveGridAuthenticator {
return _authClient ??= await createClient();
}

/// Returns the current authentication token if available and valid.
String? getAuthToken() {
// Here, you can add logic to check if the token is expired or not.
// For simplicity, we're directly returning the accessToken,
// but consider checking the token's validity first.
return _token?.accessToken;
}

/// Used to test implementation of get _client
@visibleForTesting
Future<Client> get authClient => _client;
Expand Down
4 changes: 2 additions & 2 deletions packages/apptive_grid_core/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: apptive_grid_core
description: Core Library for ApptiveGrid used to provide general ApptiveGrid functionality to other Packages or Apps
version: 2.1.1
version: 2.1.2
homepage: https://www.apptivegrid.de
repository: https://github.com/ApptiveGrid/apptive_grid_flutter/tree/main/packages/apptive_grid_core

Expand All @@ -11,7 +11,7 @@ environment:
dependencies:
collection: ^1.17.2
image: ^4.0.17
intl: ^0.18.0
intl: ^0.19.0
http: '>=0.13.6 <2.0.0'
mime: ^1.0.4
provider: ^6.0.5
Expand Down
22 changes: 22 additions & 0 deletions packages/apptive_grid_core/test/authenticator_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,28 @@ void main() {
});
});

group('Get User token', () {
test('Get Token returns token', () async {
final httpClient = MockHttpClient();
final agClient = MockApptiveGridClient();
when(() => agClient.options).thenReturn(const ApptiveGridOptions());
authenticator =
ApptiveGridAuthenticator(client: agClient, httpClient: httpClient);

final tokenTime = DateTime.now();
final tokenResponse = {
'token_type': 'Bearer',
'access_token': '12345',
'expires_at': tokenTime.millisecondsSinceEpoch,
'expires_in': tokenTime.microsecondsSinceEpoch,
};

await authenticator.setUserToken(tokenResponse);

expect(authenticator.getAuthToken(), tokenResponse['access_token']);
});
});

group('Authenticator', () {
final urlLauncher = MockUrlLauncher();

Expand Down
Loading
Loading