Commit b75a9279 authored by DatHV's avatar DatHV
Browse files

update config, build.

parent 36ac8d24
......@@ -14,9 +14,8 @@ flutter {
source = "../.."
}
// --- Signing (optional) ---
val keystoreProps = Properties().apply {
val f = rootProject.file("key.properties")
val f = File(projectDir, "keystores/key.properties")
if (f.exists()) load(FileInputStream(f))
}
......@@ -29,7 +28,7 @@ fun readEnvJson(flavor: String): Map<String, Any> {
} else {
mapOf(
"baseUrl" to "https://api.sandbox.mypoint.com.vn/8854/gup2start/rest",
"t3Token" to "default_token",
"t3Token" to "android-app-src-build-gradle-kts",
"enableLogging" to true
)
}
......@@ -54,6 +53,8 @@ android {
storePassword = keystoreProps.getProperty("storePassword")
keyAlias = keystoreProps.getProperty("keyAlias")
keyPassword = keystoreProps.getProperty("keyPassword")
} else {
logger.warn("storeFile missing in key.properties; release build will be unsigned.")
}
}
}
......
{
"name":"dev",
"flavor":"dev",
"baseUrl":"https://api.sandbox.mypoint.com.vn/8854/gup2start/rest",
"t3Token":"dev-xxx",
"t3Token": "android-app-src-dev-token",
"enableLogging":true
}
......@@ -20,7 +20,7 @@ class MainActivity : FlutterActivity() {
result.success(mapOf(
"flavor" to flavor,
"baseUrl" to baseUrl,
"libToken" to libToken,
"t3Token" to libToken,
"enableLogging" to enableLogging
))
}
......
{
"name":"pro",
"flavor":"pro",
"baseUrl":"https://api.mypoint.com.vn/8854/gup2start/rest",
"t3Token":"xxx",
"t3Token":"android-app-src-pro-token",
"enableLogging":false
}
{
"name":"stg",
"flavor":"stg",
"baseUrl":"https://api.sandbox.mypoint.com.vn/8854/gup2start/rest",
"t3Token":"stg-xxx",
"t3Token":"android-app-src-stg-token",
"enableLogging":true
}
......@@ -16,14 +16,6 @@ subprojects {
project.evaluationDependsOn(":app")
}
//subprojects {
// plugins.withId("org.jetbrains.kotlin.android") {
// extensions.configure<org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension> {
// jvmToolchain(17)
// }
// }
//}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
......
{
"name":"pro",
"flavor":"pro",
"baseUrl":"https://api.mypoint.com.vn/8854/gup2start/rest",
"t3Token":"xxx",
"t3Token":"runner-env-t3Token-pro",
"enableLogging":false
}
// Production environment config
FLAVOR=prod
FLAVOR=pro
BASE_URL=https://api.mypoint.com.vn/8854/gup2start/rest
LIB_TOKEN=prod_token_here
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.usernotifications.service</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).NotificationService</string>
</dict>
</dict>
</plist>
//
// NotificationService.swift
// NotificationServices
//
// Created by DatHV on 23/9/25.
//
import UserNotifications
class NotificationService: UNNotificationServiceExtension {
var contentHandler: ((UNNotificationContent) -> Void)?
var bestAttemptContent: UNMutableNotificationContent?
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
self.contentHandler = contentHandler
bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
if let bestAttemptContent = bestAttemptContent {
// Modify the notification content here...
bestAttemptContent.title = "\(bestAttemptContent.title) [modified]"
contentHandler(bestAttemptContent)
}
}
override func serviceExtensionTimeWillExpire() {
// Called just before the extension will be terminated by the system.
// Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent {
contentHandler(bestAttemptContent)
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.icom.vn.MyPoint.MoEngage</string>
</array>
</dict>
</plist>
......@@ -40,6 +40,16 @@
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
9D11305C2E825692000368DD /* Embed Foundation Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
);
name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
......@@ -82,6 +92,10 @@
FCF92C398B4E9BA7B69FFA54 /* Pods-Runner.debug-stg.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug-stg.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug-stg.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
9D1130552E825692000368DD /* NotificationServices */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = NotificationServices; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */
/* Begin PBXFrameworksBuildPhase section */
1FFAD840598F4927836EE625 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
......@@ -160,6 +174,7 @@
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
9D1130552E825692000368DD /* NotificationServices */,
97C146EF1CF9000F007C117D /* Products */,
331C8082294A63A400263BE5 /* RunnerTests */,
5401D504A734375807EF493E /* Pods */,
......@@ -228,6 +243,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
99C1A4F15BFF747ABEB07D13 /* [CP] Copy Pods Resources */,
9D11305C2E825692000368DD /* Embed Foundation Extensions */,
);
buildRules = (
);
......@@ -245,6 +261,7 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1620;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
......
......@@ -70,7 +70,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Debug-dev"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
......@@ -110,10 +110,10 @@
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
buildConfiguration = "Debug-dev">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
buildConfiguration = "Release-dev"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
......@@ -70,7 +70,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Debug-pro"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
......@@ -110,10 +110,10 @@
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
buildConfiguration = "Debug-pro">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
buildConfiguration = "Release-pro"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
{
"name":"dev",
"flavor":"dev",
"baseUrl":"https://api.sandbox.mypoint.com.vn/8854/gup2start/rest",
"t3Token":"dev-xxx",
"t3Token":"runner-env-flavor-dev",
"enableLogging":true
}
{
"name":"pro",
"flavor":"pro",
"baseUrl":"https://api.mypoint.com.vn/8854/gup2start/rest",
"t3Token":"xxx",
"t3Token":"runner-env-t3Token-pro",
"enableLogging":false
}
{
"name":"stg",
"flavor":"stg",
"baseUrl":"https://api.sandbox.mypoint.com.vn/8854/gup2start/rest",
"t3Token":"stg-xxx",
"t3Token":"runner-env-flavor-stg",
"enableLogging":true
}
......@@ -4,5 +4,18 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:mypointtest.onelink.me</string>
<string>applinks:mypointservices.onelink.me</string>
<string>applinks:mypointcross.onelink.me</string>
<string>applinks:mypointapp.page.link</string>
<string>applinks:mypoint-alternate.app.link</string>
<string>applinks:mypoint.app.link</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.icom.vn.MyPoint.MoEngage</string>
</array>
</dict>
</plist>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment