Skip to content

Commit b7489d3

Browse files
authored
chore: Removed NStack feature integration (#161)
1 parent d58b095 commit b7489d3

File tree

16 files changed

+1456
-102
lines changed

16 files changed

+1456
-102
lines changed

.github/workflows/pull_request_validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: ♨️ Setup Java
2020
uses: actions/setup-java@v3
2121
with:
22-
java-version: '17'
22+
java-version: '21'
2323
distribution: 'temurin'
2424

2525
- name: 🐦 Setup Flutter

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ app.*.map.json
4747
# Flutter code generation
4848
*.freezed.dart
4949
*.g.dart
50-
nstack.dart
5150
*.gr.dart
5251
*.config.dart
5352
lib/gen/**
5453

5554
# Dependencies
56-
**.lock
55+
# Pubspec.lock should be checked out to git
56+
# to ensure everyone in the team is using the same version.
57+
# Recommended by Flutter as well.
58+
# We can git ignore Podfile.lock only.
59+
Podfile.lock

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,4 @@ This project serves as a template project for Flutter applications. You can gene
4444
- [Confluence](https://TODO)
4545
- [Slack Channel](https://TODO)
4646
- [OpenAPI Specification](https://TODO)
47-
- [NStack](https://TODO)
4847
- [Figma Design](https://TODO)

analysis_options.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,5 @@ analyzer:
2222
- "**/*.g.dart"
2323
# Ignore warnings in files generated by Freezed specifically.
2424
- "**/*.freezed.dart"
25-
# Ignore warnings in files generated by NStack specifically.
26-
- "**/*nstack.dart"
2725
# Ignore bricks
2826
- bricks/**

android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def appName = "Monstarlab Flutter Template"
99

1010
// TODO: Change the applicationId for production
1111
// On staging it will add .staging and on development it will add .development as suffix.
12-
def applicationId = "com.monstarlab.flutter"
12+
def packageName = "com.monstarlab.flutter"
1313

1414
ext {
1515
androidMinSdkVersion = 21
@@ -18,9 +18,9 @@ ext {
1818

1919

2020
android {
21-
namespace = "$applicationId"
21+
namespace = "$packageName"
2222
compileSdk = androidCompileAndTargetSdkVersion
23-
ndkVersion = flutter.ndkVersion
23+
ndkVersion = "27.0.12077973"
2424

2525
compileOptions {
2626
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -32,7 +32,7 @@ android {
3232
}
3333

3434
defaultConfig {
35-
applicationId = "$applicationId"
35+
applicationId = "$packageName"
3636
// You can update the following values to match your application needs.
3737
// For more information, see: https://flutter.dev/to/review-gradle-config.
3838
minSdk = androidMinSdkVersion

android/app/proguard-rules.pro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-dontwarn com.google.errorprone.annotations.CanIgnoreReturnValue
2+
-dontwarn com.google.errorprone.annotations.CheckReturnValue
3+
-dontwarn com.google.errorprone.annotations.Immutable
4+
-dontwarn com.google.errorprone.annotations.RestrictedApi
5+
-dontwarn javax.annotation.Nullable
6+
-dontwarn javax.annotation.concurrent.GuardedBy

android/build.gradle

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,6 @@ allprojects {
66
}
77

88
rootProject.buildDir = "../build"
9-
// [NStack] the namespace property is null within
10-
// the android block of the build.gradle file for the nstack sdk.
11-
// Additionally, the Kotlin Gradle plugin is using a very old version there.
12-
subprojects {
13-
afterEvaluate { project ->
14-
if (project.name == 'nstack') {
15-
if (project.hasProperty('android')) {
16-
project.android {
17-
if (namespace == null) {
18-
namespace project.group
19-
}
20-
}
21-
project.buildscript {
22-
dependencies {
23-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
24-
}
25-
}
26-
}
27-
}
28-
}
29-
}
30-
// End of NStack workaround
31-
32-
339
subprojects {
3410
project.buildDir = "${rootProject.buildDir}/${project.name}"
3511
}

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip

android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version '7.4.2' apply false
22-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
21+
id "com.android.application" version '8.7.2' apply false
22+
id "org.jetbrains.kotlin.android" version "2.0.20" apply false
2323
}
2424

2525
include ":app"

lib/data/response_objects/error_response.dart

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import 'package:flutter_template/domain/common/response_error/response_error.dart';
2-
import 'package:flutter_template/nstack/nstack.dart';
32
import 'package:freezed_annotation/freezed_annotation.dart';
43

54
part 'error_response.freezed.dart';
65
part 'error_response.g.dart';
76

8-
///The BE should provide one unique code for each error, in this case the
9-
///error is being provided through errorName so we create an Enum for each
10-
///code we are aware of with a default value to unknown
7+
/// The BE should provide one unique code for each error, in this case the
8+
/// error is being provided through errorName so we create an Enum for each
9+
/// code we are aware of with a default value to unknown
1110
@freezed
1211
class APIError with _$APIError {
1312
const factory APIError({
@@ -27,9 +26,9 @@ class APIError with _$APIError {
2726
@freezed
2827
class ErrorResponse with _$ErrorResponse {
2928
const factory ErrorResponse({
30-
//TODO: name this according to the map key from the error response
31-
//if no map key exists then just create this factory with the APIError values
32-
//and remove APIError,
29+
// TODO: name this according to the map key from the error response
30+
// if no map key exists then just create this factory with the APIError values
31+
// and remove APIError,
3332
required APIError error,
3433
}) = _ErrorResponse;
3534

@@ -38,7 +37,7 @@ class ErrorResponse with _$ErrorResponse {
3837
}
3938

4039
enum ErrorName {
41-
//Add error enum and the BE value
40+
// Add error enum and the BE value
4241
@JsonValue('errorExample')
4342
errorExample,
4443
unknown,
@@ -53,13 +52,13 @@ extension ErrorResponseExtensions on ErrorResponse {
5352
}
5453

5554
extension ErrorNameExtensions on ErrorName {
56-
String getErrorMessage(Localization l10n) {
55+
String getErrorMessage() {
5756
switch (this) {
58-
//Handle error enum and return mapped nstack value
57+
// TODO: Handle error enum and return mapped localized value
5958
case ErrorName.errorExample:
60-
return l10n.error.authenticationError;
59+
return 'Error Occurred';
6160
default:
62-
return '';
61+
return 'Unexpected Error';
6362
}
6463
}
6564
}

0 commit comments

Comments
 (0)