Skip to content

Commit

Permalink
chore: Migrate from app.json to app.config.ts and synchronize ver…
Browse files Browse the repository at this point in the history
…sioning (#612)
  • Loading branch information
ecnivtwelve authored Jan 20, 2025
2 parents e5533c5 + bb9f039 commit 00694a6
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 130 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ android {
applicationId 'xyz.getpapillon.app'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 7720
versionCode 772
versionName "7.7.2"
}
signingConfigs {
Expand Down
127 changes: 127 additions & 0 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
import { ExpoConfig } from "expo/config";
import PackageJSON from "./package.json";

export default (): ExpoConfig => ({
name: "Papillon",
slug: PackageJSON.name,
scheme: "papillon",
version: PackageJSON.version,
orientation: "portrait",
icon: "./assets/icon.png",
userInterfaceStyle: "automatic",
primaryColor: "#32AB8E",
splash: {
image: "./assets/launch/splash.png",
resizeMode: "cover",
backgroundColor: "#32AB8E",
},
assetBundlePatterns: ["**/*"],
ios: {
supportsTablet: true,
appStoreUrl:
"https://apps.apple.com/us/app/papillon-lappli-scolaire/id6477761165",
bundleIdentifier: "xyz.getpapillon.ios",
associatedDomains: ["applinks:getpapillon.xyz"],
infoPlist: {
CFBundleURLTypes: [
{
CFBundleURLSchemes: ["papillon", "izly"],
},
],
},
splash: {
backgroundColor: "#32AB8E",
image: "./assets/launch/splash.png",
resizeMode: "cover",
dark: {
backgroundColor: "#001C0F",
image: "./assets/launch/splash-dark.png",
resizeMode: "cover",
},
},
config: {
usesNonExemptEncryption: false,
},
},
android: {
versionCode: parseInt(PackageJSON.version.replaceAll(".", "")),
playStoreUrl:
"https://play.google.com/store/apps/details?id=xyz.getpapillon.app",
adaptiveIcon: {
foregroundImage: "./assets/launch/adaptive-icon-foreground.png",
backgroundImage: "./assets/launch/adaptive-icon-background.png",
monochromeImage: "./assets/launch/adaptive-icon-monochrome.png",
backgroundColor: "#32AB8E",
},
intentFilters: [
{
action: "VIEW",
data: [{ scheme: "papillon" }, { scheme: "izly" }],
category: ["BROWSABLE", "DEFAULT"],
},
],
splash: {
backgroundColor: "#32AB8E",
image: "./assets/launch/splash.png",
resizeMode: "cover",
dark: {
backgroundColor: "#001C0F",
image: "./assets/launch/splash-dark.png",
resizeMode: "cover",
},
},
package: "xyz.getpapillon.app",
permissions: [
"android.permission.ACCESS_COARSE_LOCATION",
"android.permission.ACCESS_FINE_LOCATION",
],
},
plugins: [
[
"expo-font",
{
fonts: [
"assets/fonts/FixelText-Bold.ttf",
"assets/fonts/FixelText-Light.ttf",
"assets/fonts/FixelText-Medium.ttf",
"assets/fonts/FixelText-Regular.ttf",
"assets/fonts/FixelText-SemiBold.ttf",
],
},
],
"expo-barcode-scanner",
[
"expo-location",
{
locationWhenInUsePermission:
"Papillon utilise ton emplacement pour trouver les établissements autour de toi.",
cameraPermission:
"Papillon utilise ta caméra pour scanner des QR-codes pour te connecter, pour capturer des documents, ou pour des fonctionnalités amusantes telles que les réactions.",
},
],
[
"expo-camera",
{
cameraPermission:
"Papillon utilise ta caméra pour scanner des QR-codes pour te connecter, pour capturer des documents, ou pour des fonctionnalités amusantes telles que les réactions.",
microphonePermission:
"Papillon utilise ton micro pour enregistrer des travaux audio ou des cours.",
recordAudioAndroid: true,
},
],
[
"expo-sensors",
{
motionPermission:
"Papillon utilise les capteurs de mouvement de ton appareil pour de nombreuses fonctionnalités interactives.",
},
],
[
"expo-image-picker",
{
photosPermission:
"Papillon utilise tes photos et vidéos pour personnaliser ton profil, ta gestion des cours et bien plus.",
},
],
],
});
121 changes: 0 additions & 121 deletions app.json

This file was deleted.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"lint": "tsc && eslint .",
"prebuild": "npx expo prebuild && npm run restore-app-icon",
"restore-app-icon": "cp -a ./AppIcon.appiconset.backup/. ios/Papillon/Images.xcassets/AppIcon.appiconset/"
"prebuild": "expo prebuild && cp -a ./AppIcon.appiconset.backup/. ios/Papillon/Images.xcassets/AppIcon.appiconset/",
"android": "expo run:android",
"ios": "expo run:ios"
},
"dependencies": {
"@birdwingo/react-native-reanimated-graph": "^1.1.3",
Expand Down
4 changes: 2 additions & 2 deletions src/views/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useEffect, useLayoutEffect, useState } from "react";
import { Alert, Image, Platform, Text, View } from "react-native";
import { useAccounts, useCurrentAccount } from "@/stores/account";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import AppJSON from "../../../app.json";
import PackageJSON from "../../../package.json";

import Reanimated, {
FadeIn,
Expand Down Expand Up @@ -440,7 +440,7 @@ const Settings: Screen<"Settings"> = ({ route, navigation }) => {
marginTop: 24,
}}
>
version {AppJSON.expo.version} {Platform.OS} {__DEV__ ? "(développeur)" : ""} {"\n"}
version {PackageJSON.version} {Platform.OS} {__DEV__ ? "(développeur)" : ""} {"\n"}
fabriqué avec ❤️ par les contributeurs Papillon
</Text>
</Reanimated.ScrollView>
Expand Down
3 changes: 1 addition & 2 deletions src/views/settings/SettingsAbout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
import { NativeList, NativeItem, NativeListHeader } from "@/components/Global/NativeComponents";
import { NativeIcon } from "@/components/Global/NativeComponents";
import { NativeText } from "@/components/Global/NativeComponents";
import AppJSON from "../../../app.json";
import PackageJSON from "../../../package.json";
import AboutContainerCard from "@/components/Settings/AboutContainerCard";
import * as Linking from "expo-linking";
Expand Down Expand Up @@ -190,7 +189,7 @@ const SettingsAbout: Screen<"SettingsAbout"> = ({ navigation }) => {
Version de l'application
</NativeText>
<NativeText variant="subtitle">
ver. {AppJSON.expo.version} {Constants.appOwnership === "expo" ? "(Expo Go)" : ""} {__DEV__ ? "(debug)" : ""}
ver. {PackageJSON.version} {Constants.appOwnership === "expo" ? "(Expo Go)" : ""} {__DEV__ ? "(debug)" : ""}
</NativeText>
</NativeItem>
<NativeItem
Expand Down

0 comments on commit 00694a6

Please sign in to comment.