diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index a7f5d33b..5cd49a77 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -8,7 +8,7 @@ runs: uses: actions/setup-node@v6 with: registry-url: https://registry.npmjs.org/ - node-version: 24 + node-version-file: .node-version - name: Cache Dependencies id: cache diff --git a/.gitignore b/.gitignore index 7c51f9aa..319ee30d 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ dist .expo/ dist/ web-build/ +/assets/fonts/ # Native *.orig.* diff --git a/app.config.ts b/app.config.ts index 5ed633c0..697cad67 100644 --- a/app.config.ts +++ b/app.config.ts @@ -2,6 +2,53 @@ import type { ExpoConfig } from 'expo/config' import { version } from './package.json' +const internalFontsPlugin = [ + 'expo-font', + { + android: { + fonts: [ + { + fontFamily: 'TT Fellows', + fontDefinitions: [ + { + path: './assets/fonts/TTFellows-DemiBoldItalic.ttf', + weight: 600, + style: 'italic', + }, + { path: './assets/fonts/TTFellows-DemiBold.ttf', weight: 600 }, + { path: './assets/fonts/TTFellows-Regular.ttf', weight: 400 }, + ], + }, + { + fontFamily: 'Noto Sans', + fontDefinitions: [ + { path: './assets/fonts/NotoSans-Bold.ttf', weight: 700 }, + { path: './assets/fonts/NotoSans-Regular.ttf', weight: 400 }, + ], + }, + ], + }, + ios: { + fonts: [ + './assets/fonts/TTFellows-DemiBold.ttf', + './assets/fonts/TTFellows-DemiBoldItalic.ttf', + './assets/fonts/TTFellows-Regular.ttf', + './assets/fonts/NotoSans-Regular.ttf', + './assets/fonts/NotoSans-Bold.ttf', + ], + }, + }, +] satisfies NonNullable[number] + +const plugins: NonNullable = [ + './expo/plugins/withEnsureBundler.js', + '@react-native-async-storage/expo-with-async-storage', +] + +if (process.env.UI_KIT_INTERNAL_FONTS === 'true') { + plugins.push(internalFontsPlugin) +} + export default { expo: { name: 'CDEK UI', @@ -10,6 +57,7 @@ export default { orientation: 'portrait', android: { package: 'ru.cdek.uikit.prime' }, ios: { + appleTeamId: 'AY3Q95T9QG', bundleIdentifier: 'ru.cdek.uikit.prime', config: { usesNonExemptEncryption: false }, }, @@ -20,10 +68,7 @@ export default { }, icon: './icon.png', updates: { fallbackToCacheTimeout: 0 }, - plugins: [ - './expo/plugins/withEnsureBundler.js', - '@react-native-async-storage/expo-with-async-storage', - ], + plugins, assetBundlePatterns: ['**/*'], } satisfies ExpoConfig, } diff --git a/fastlane/.env.default b/fastlane/.env.default new file mode 100644 index 00000000..e61ea5d5 --- /dev/null +++ b/fastlane/.env.default @@ -0,0 +1,9 @@ +APP_NAME=CDEKUI +ANDROID_BUILD_TYPE=Release +ANDROID_KEY_ALIAS=androiddebugkey +ANDROID_KEYSTORE_FILEPATH=$PWD/android/app/debug.keystore +ANDROID_KEYSTORE_PASSWORD=android +ANDROID_KEY_PASSWORD=android +FL_GRADLE_PROJECT_DIR=android +IOS_PROJECT_PATH=ios +IOS_PROJECT_WORKSPACE=CDEKUI diff --git a/fastlane/Appfile b/fastlane/Appfile new file mode 100644 index 00000000..0cbfe365 --- /dev/null +++ b/fastlane/Appfile @@ -0,0 +1,4 @@ +package_name "ru.cdek.uikit.prime" +app_identifier "ru.cdek.uikit.prime" +itc_team_id "119091977" +team_id "AY3Q95T9QG" diff --git a/fastlane/Matchfile b/fastlane/Matchfile new file mode 100644 index 00000000..8e7361bc --- /dev/null +++ b/fastlane/Matchfile @@ -0,0 +1,4 @@ +git_url ENV.fetch("MATCH_GIT_URL") +git_branch "master" +storage_mode "git" +readonly true diff --git a/ios/CDEKUI.xcodeproj/project.pbxproj b/ios/CDEKUI.xcodeproj/project.pbxproj index 1d56f0e4..64abda82 100644 --- a/ios/CDEKUI.xcodeproj/project.pbxproj +++ b/ios/CDEKUI.xcodeproj/project.pbxproj @@ -377,8 +377,11 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "Apple Distribution"; CODE_SIGN_ENTITLEMENTS = CDEKUI/CDEKUI.entitlements; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = AY3Q95T9QG; INFOPLIST_FILE = CDEKUI/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.1; LD_RUNPATH_SEARCH_PATHS = ( @@ -394,6 +397,7 @@ OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; PRODUCT_BUNDLE_IDENTIFIER = ru.cdek.uikit.prime; PRODUCT_NAME = "CDEKUI"; + PROVISIONING_PROFILE_SPECIFIER = "match AppStore ru.cdek.uikit.prime"; SWIFT_OBJC_BRIDGING_HEADER = "CDEKUI/CDEKUI-Bridging-Header.h"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1"; diff --git a/package.json b/package.json index 42f78d05..89b10451 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,7 @@ "expo-application": "55.0.14", "expo-constants": "55.0.15", "expo-doctor": "1.18.20", + "expo-font": "55.0.6", "expo-status-bar": "55.0.5", "inquirer-search-list": "1.2.6", "jest": "29.7.0", @@ -147,7 +148,7 @@ }, "packageManager": "yarn@4.6.0", "engines": { - "node": "20" + "node": ">=22 <23" }, "config": { "commitizen": { diff --git a/yarn.lock b/yarn.lock index 8475446c..3ec08e23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2861,6 +2861,7 @@ __metadata: expo-application: "npm:55.0.14" expo-constants: "npm:55.0.15" expo-doctor: "npm:1.18.20" + expo-font: "npm:55.0.6" expo-status-bar: "npm:55.0.5" inquirer-search-list: "npm:1.2.6" jest: "npm:29.7.0" @@ -10542,7 +10543,7 @@ __metadata: languageName: node linkType: hard -"expo-font@npm:~55.0.6": +"expo-font@npm:55.0.6, expo-font@npm:~55.0.6": version: 55.0.6 resolution: "expo-font@npm:55.0.6" dependencies: