Skip to content

Commit

Permalink
FR-18979: initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-minaiev-frontegg committed Dec 10, 2024
1 parent d6988f8 commit da0b805
Show file tree
Hide file tree
Showing 15 changed files with 390 additions and 111 deletions.
28 changes: 27 additions & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ android {
namespace "com.frontegg.demo"
compileSdk 34
ndkVersion flutter.ndkVersion
ndkVersion = "26.1.10909125"


compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down Expand Up @@ -61,6 +63,23 @@ android {
buildConfigField "String", 'FRONTEGG_CLIENT_ID', "\"$fronteggClientId\""
buildConfigField "Boolean", 'FRONTEGG_USE_ASSETS_LINKS', "true"
buildConfigField "Boolean", 'FRONTEGG_USE_CHROME_CUSTOM_TABS', "true"

testInstrumentationRunner "pl.leancode.patrol.PatrolJUnitRunner"
testInstrumentationRunnerArguments clearPackageData: "true"
}

testOptions {
execution "ANDROIDX_TEST_ORCHESTRATOR"
}

signingConfigs {
debug {
storeFile file("./../../../.github/test-jks/debug.keystore")
}

release {
storeFile file("./../../../.github/test-jks/release.keystore")
}
}

signingConfigs {
Expand All @@ -81,6 +100,11 @@ android {
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}

debug {
minifyEnabled false
shrinkResources false
}
}

buildFeatures {
Expand All @@ -94,4 +118,6 @@ flutter {
source '../..'
}

dependencies {}
dependencies {
androidTestUtil "androidx.test:orchestrator:1.5.1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.frontegg.demo;

import androidx.test.platform.app.InstrumentationRegistry;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;

import pl.leancode.patrol.PatrolJUnitRunner;

@RunWith(Parameterized.class)
public class MainActivityTest {
@Parameters(name = "{0}")
public static Object[] testCases() {
PatrolJUnitRunner instrumentation = (PatrolJUnitRunner) InstrumentationRegistry.getInstrumentation();
// replace "MainActivity.class" with "io.flutter.embedding.android.FlutterActivity.class"
// if in AndroidManifest.xml in manifest/application/activity you have
// android:name="io.flutter.embedding.android.FlutterActivity"
instrumentation.setUp(MainActivity.class);
instrumentation.waitForPatrolAppService();
return instrumentation.listDartTests();
}

public MainActivityTest(String dartTestName) {
this.dartTestName = dartTestName;
}

private final String dartTestName;

@Test
public void runDartTest() {
PatrolJUnitRunner instrumentation = (PatrolJUnitRunner) InstrumentationRegistry.getInstrumentation();
instrumentation.runDartTest(dartTestName);
}
}
6 changes: 3 additions & 3 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">

<application
android:label="demo"
android:label="Frontegg Demo"
android:icon="@mipmap/ic_launcher"
android:allowBackup="true"
android:supportsRtl="true"
Expand Down Expand Up @@ -33,8 +33,8 @@
android:name="flutterEmbedding"
android:value="2" />

<activity android:name="com.frontegg.android.EmbeddedAuthActivity" tools:replace="android:enabled" android:enabled="false"/>
<activity android:name="com.frontegg.android.HostedAuthActivity" tools:replace="android:enabled" android:enabled="true"/>
<activity android:name="com.frontegg.android.EmbeddedAuthActivity" tools:replace="android:enabled" android:enabled="true"/>
<activity android:name="com.frontegg.android.HostedAuthActivity" tools:replace="android:enabled" android:enabled="false"/>
</application>


Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.4.2" apply false
id "com.android.application" version "8.4.0" apply false
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
}

Expand Down
5 changes: 3 additions & 2 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ target 'Runner' do
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths

target 'RunnerUITests' do
inherit! :complete
end
end

Expand Down
13 changes: 12 additions & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
PODS:
- CocoaAsyncSocket (7.6.5)
- Flutter (1.0.0)
- frontegg_flutter (1.0.3):
- Flutter
- FronteggSwift (~> 1.2.26)
- FronteggSwift (1.2.26)
- integration_test (0.0.1):
- Flutter
- patrol (0.0.1):
- CocoaAsyncSocket (~> 7.6)
- Flutter
- FlutterMacOS

DEPENDENCIES:
- Flutter (from `Flutter`)
- frontegg_flutter (from `.symlinks/plugins/frontegg_flutter/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- patrol (from `.symlinks/plugins/patrol/darwin`)

SPEC REPOS:
trunk:
- CocoaAsyncSocket
- FronteggSwift

EXTERNAL SOURCES:
Expand All @@ -23,13 +30,17 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/frontegg_flutter/ios"
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
patrol:
:path: ".symlinks/plugins/patrol/darwin"

SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
frontegg_flutter: 845fcc6280c941d99021f47cb22ce4bf39f029df
FronteggSwift: a92b852ed3721627dcbef0dfc985380c0fa4eb60
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
patrol: 0564cee315ff6c86fb802b3647db05cc2d3d0624

PODFILE CHECKSUM: 1959d098c91d8a792531a723c4a9d7e9f6a01e38
PODFILE CHECKSUM: c9be09f6a61958d6788db8b9ee489767b65cfa92

COCOAPODS: 1.15.2
Loading

0 comments on commit da0b805

Please sign in to comment.