Skip to content

Commit

Permalink
Merge pull request #920 from andrew-bierman/fix/android-build-ab-fork
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-bierman authored May 10, 2024
2 parents 2da404e + 8c5c643 commit fc83f69
Show file tree
Hide file tree
Showing 23 changed files with 1,184 additions and 1,253 deletions.
2 changes: 1 addition & 1 deletion apps/expo/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ yarn-error.log
web-build/
dist/

# @end expo-cli
# @end expo-cli
46 changes: 30 additions & 16 deletions apps/expo/app.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
import "dotenv/config";


module.exports = ({ config }) => {
return {
...config,
plugins: config.plugins.map(i => {
if (i[0] === "@rnmapbox/maps") {
return [
"@rnmapbox/maps",
{
"RNMapboxMapsImpl": "mapbox",
"RNMapboxMapsDownloadToken": process.env.MAPBOX_DOWNLOADS_TOKEN
}
]
}
return i;
})
};
};

config.extra.NODE_ENV = process.env.NODE_ENV;
config.extra.CLIENT_URL = process.env.CLIENT_URL;
config.extra.MAPBOX_ACCESS_TOKEN = process.env.MAPBOX_ACCESS_TOKEN;
config.extra.API_URL = process.env.API_URL;

config.extra.EXPO_PUBLIC_NODE_ENV = process.env.EXPO_PUBLIC_NODE_ENV;
config.extra.EXPO_PUBLIC_CLIENT_URL = process.env.EXPO_PUBLIC_CLIENT_URL;
config.extra.EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN = process.env.EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN;
config.extra.EXPO_PUBLIC_API_URL = process.env.EXPO_PUBLIC_API_URL;

return {
...config,
plugins: config.plugins.map(i => {
if (i[0] === "@rnmapbox/maps") {
return [
"@rnmapbox/maps",
{
"RNMapboxMapsImpl": "mapbox",
"RNMapboxMapsDownloadToken": process.env.MAPBOX_DOWNLOADS_TOKEN
}
]
}
return i;
})
};
};
13 changes: 7 additions & 6 deletions apps/expo/app.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"backgroundColor": "#ffffff",
"scheme": "myapp"
},
"assetBundlePatterns": ["**/*"],
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.andrewbierman.packrat"
Expand Down Expand Up @@ -47,12 +49,12 @@
"expo-build-properties",
{
"android": {
"compileSdkVersion": 31,
"targetSdkVersion": 31,
"buildToolsVersion": "31.0.0"
"compileSdkVersion": 34,
"targetSdkVersion": 34,
"buildToolsVersion": "34.0.0"
},
"ios": {
"deploymentTarget": "13.0"
"deploymentTarget": "13.4"
}
}
]
Expand All @@ -64,5 +66,4 @@
},
"owner": "andrewbierman"
}

}
26 changes: 13 additions & 13 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@
"@rneui/base": "^4.0.0-rc.8",
"@rneui/themed": "^4.0.0-rc.8",
"@rnmapbox/maps": "^10.1.21",
"@tamagui/animations-react-native": "^1.96.0",
"@tamagui/babel-plugin": "^1.96.0",
"@tamagui/config": "^1.96.0",
"@tamagui/font-inter": "^1.96.0",
"@tamagui/linear-gradient": "^1.96.0",
"@tamagui/lucide-icons": "^1.96.0",
"@tamagui/progress": "^1.96.0",
"@tamagui/react-native-media-driver": "^1.96.0",
"@tamagui/shorthands": "^1.96.0",
"@tamagui/switch": "^1.96.0",
"@tamagui/theme-base": "^1.96.0",
"@tamagui/themes": "^1.96.0",
"@tamagui/animations-react-native": "1.96.0",
"@tamagui/babel-plugin": "1.96.0",
"@tamagui/config": "1.96.0",
"@tamagui/font-inter": "1.96.0",
"@tamagui/linear-gradient": "1.96.0",
"@tamagui/lucide-icons": "1.96.0",
"@tamagui/progress": "1.96.0",
"@tamagui/react-native-media-driver": "1.96.0",
"@tamagui/shorthands": "1.96.0",
"@tamagui/switch": "1.96.0",
"@tamagui/theme-base": "1.96.0",
"@tamagui/themes": "1.96.0",
"@tanstack/query-async-storage-persister": "^4.36.1",
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-query-devtools": "^4.36.1",
Expand Down Expand Up @@ -146,7 +146,7 @@
"serve": "^14.2.0",
"server": "*",
"superjson": "^2.0.0",
"tamagui": "^1.96.0",
"tamagui": "1.96.0",
"togpx": "^0.5.4",
"uuid": "3.4.0",
"xmldom": "^0.6.0",
Expand Down
13 changes: 6 additions & 7 deletions apps/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"@babel/plugin-transform-react-jsx": "^7.23.4",
"@expo/next-adapter": "5.0.2",
"@react-native/assets-registry": "0.74.81",
"@tamagui/config": "^1.96.0",
"@tamagui/next-plugin": "^1.96.0",
"@tamagui/next-theme": "^1.96.0",
"@tamagui/config": "1.96.0",
"@tamagui/next-plugin": "1.96.0",
"@tamagui/next-theme": "1.96.0",
"app": "*",
"babel-preset-expo": "^10.0.1",
"babel-preset-react-native": "^4.0.1",
Expand All @@ -38,15 +38,14 @@
"react-dom": "18.2.0",
"react-native-web": "^0.19.10",
"setimmediate": "^1.0.5",
"sharp": "^0.33.3",
"tamagui": "^1.96.0",
"tamagui": "1.96.0",
"url-loader": "^4.1.1",
"vercel": "latest"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@cloudflare/next-on-pages": "^1.11.0",
"@cloudflare/workers-types": "^4.20240419.0",
"@cloudflare/next-on-pages": "1.11.0",
"@cloudflare/workers-types": "4.20240419.0",
"@types/node": "^20.8.3",
"babel-plugin-module-resolver": "^5.0.0",
"eslint-plugin-next-on-pages": "^1.11.0",
Expand Down
12 changes: 6 additions & 6 deletions apps/tauri/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"@babel/plugin-transform-react-jsx": "^7.23.4",
"@expo/next-adapter": "5.0.2",
"@react-native/assets-registry": "0.74.81",
"@tamagui/config": "^1.96.0",
"@tamagui/next-plugin": "^1.96.0",
"@tamagui/next-theme": "^1.96.0",
"@tamagui/config": "1.96.0",
"@tamagui/next-plugin": "1.96.0",
"@tamagui/next-theme": "1.96.0",
"app": "*",
"babel-preset-expo": "^10.0.1",
"babel-preset-react-native": "^4.0.1",
Expand All @@ -36,14 +36,14 @@
"react-dom": "18.2.0",
"react-native-web": "^0.19.10",
"setimmediate": "^1.0.5",
"tamagui": "^1.96.0",
"tamagui": "1.96.0",
"url-loader": "^4.1.1",
"vercel": "latest"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@cloudflare/next-on-pages": "^1.11.0",
"@cloudflare/workers-types": "^4.20240419.0",
"@cloudflare/next-on-pages": "1.11.0",
"@cloudflare/workers-types": "4.20240419.0",
"@tauri-apps/cli": "^1.5.9",
"@types/node": "^20.8.3",
"babel-plugin-module-resolver": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@packrat/ui": "*",
"@packrat/validations": "*",
"@react-native/assets-registry": "0.74.81",
"@tamagui/vite-plugin": "^1.96.0",
"@tamagui/vite-plugin": "1.96.0",
"@tanstack/react-router": "^1.16.5",
"@tanstack/router-devtools": "^1.16.5",
"@tanstack/router-vite-plugin": "^1.16.5",
Expand Down
1 change: 0 additions & 1 deletion packages/app/api/getTrails.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { X_RAPIDAPI_KEY } from '@env';
import axios from 'app/config/axios';
import { api } from 'constants/api';
import osmtogeojson from 'osmtogeojson';
Expand Down
1 change: 0 additions & 1 deletion packages/app/api/getTrailsResult.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { GEOAPIFY_KEY } from '@env';
import axios from 'app/config/axios';

/**
Expand Down
4 changes: 1 addition & 3 deletions packages/app/components/map/NativeMap.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import {
Alert,
Linking,
} from 'react-native';
// import { check, PERMISSIONS, RESULTS } from 'react-native-permissions';
import { MaterialCommunityIcons } from '@expo/vector-icons';
import Mapbox, { ShapeSource, offlineManager, Camera } from '@rnmapbox/maps';
import { AlertDialog } from 'native-base';
import { RButton, RInput } from '@packrat/ui';

// get mapbox access token from .env file
import { MAPBOX_ACCESS_TOKEN } from '@env';
import { MAPBOX_ACCESS_TOKEN } from '@packrat/config';

import { theme } from '../../theme';
import MapButtonsOverlay from './MapButtonsOverlay';
Expand Down
7 changes: 2 additions & 5 deletions packages/app/components/map/WebMap.web.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import React, { useState } from 'react';
import mapboxgl from 'mapbox-gl';
import { MAPBOX_ACCESS_TOKEN } from '@env';

import { View, Modal, Alert } from 'react-native';
import { isPolygonOrMultiPolygon } from '../../utils/mapFunctions';
import MapButtonsOverlay from './MapButtonsOverlay';
import MapPreview from './MapPreview';
import useCustomStyles from 'app/hooks/useCustomStyles';
import { useWebMap } from 'app/hooks/map/useWebMap';
import useGpxUpload from './useGpxUpload';
// import 'mapbox-gl/dist/mapbox-gl.css'
import { MAPBOX_ACCESS_TOKEN } from '@packrat/config';

mapboxgl.accessToken =
'pk.eyJ1IjoiYW5kcmV3Ymllcm1hbiIsImEiOiJjbDhwYTVtc3kwMGprM3Buejg3d2doa2pvIn0.F_D3I0KRlQkQK70DkK7MlQ';
mapboxgl.accessToken = MAPBOX_ACCESS_TOKEN;

const DESTINATION = 'destination';
const TRIP = 'trip';
Expand Down
2 changes: 1 addition & 1 deletion packages/app/components/map/useGpxUpload.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import mapboxgl from 'mapbox-gl';
import { MAPBOX_ACCESS_TOKEN } from '@env';
import { MAPBOX_ACCESS_TOKEN } from '@packrat/config';

import { View, Modal, Alert } from 'react-native';
import * as DocumentPicker from 'expo-document-picker';
Expand Down
2 changes: 1 addition & 1 deletion packages/app/components/pack/PackDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { RButton, RText } from '@packrat/ui';
import { DetailsComponent } from '../details';
import { Dimensions, Platform, View, FlatList } from 'react-native';
import { theme } from '../../theme';
import { CLIENT_URL } from '@env';
import { CLIENT_URL } from '@packrat/config';
import ScoreContainer from '../ScoreContainer';
import ChatContainer from '../chat';
import { AddItem } from '../item/AddItem';
Expand Down
2 changes: 1 addition & 1 deletion packages/app/constants/api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// export const api = "http://add your ip address";

import { API_URL } from '@env';
import { API_URL } from '@packrat/config';

export const api = API_URL;
28 changes: 14 additions & 14 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@
"@rneui/base": "^4.0.0-rc.8",
"@rneui/themed": "^4.0.0-rc.8",
"@rnmapbox/maps": "^10.1.21",
"@tamagui/animations-react-native": "^1.96.0",
"@tamagui/babel-plugin": "^1.96.0",
"@tamagui/config": "^1.96.0",
"@tamagui/font-inter": "^1.96.0",
"@tamagui/linear-gradient": "^1.96.0",
"@tamagui/lucide-icons": "^1.96.0",
"@tamagui/progress": "^1.96.0",
"@tamagui/react-native-media-driver": "^1.96.0",
"@tamagui/shorthands": "^1.96.0",
"@tamagui/switch": "^1.96.0",
"@tamagui/theme-base": "^1.96.0",
"@tamagui/themes": "^1.96.0",
"@tamagui/use-did-finish-ssr": "^1.96.0",
"@tamagui/animations-react-native": "1.96.0",
"@tamagui/babel-plugin": "1.96.0",
"@tamagui/config": "1.96.0",
"@tamagui/font-inter": "1.96.0",
"@tamagui/linear-gradient": "1.96.0",
"@tamagui/lucide-icons": "1.96.0",
"@tamagui/progress": "1.96.0",
"@tamagui/react-native-media-driver": "1.96.0",
"@tamagui/shorthands": "1.96.0",
"@tamagui/switch": "1.96.0",
"@tamagui/theme-base": "1.96.0",
"@tamagui/themes": "1.96.0",
"@tamagui/use-did-finish-ssr": "1.96.0",
"@tanstack/query-async-storage-persister": "^4.36.1",
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-query-devtools": "^4.36.1",
Expand Down Expand Up @@ -131,7 +131,7 @@
"server": "*",
"solito": "^4.2.0",
"superjson": "^2.0.0",
"tamagui": "^1.96.0",
"tamagui": "1.96.0",
"togpx": "^0.5.4",
"uuid": "3.4.0",
"xmldom": "^0.6.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/app/screens/LoginScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
SubmitButton,
} from '@packrat/ui';
import { FontAwesome } from '@expo/vector-icons';
import { NODE_ENV } from '@env';
import { NODE_ENV } from '@packrat/config';
import { Link } from '@packrat/crosspath';
import useTheme from '../hooks/useTheme';
import { useGoogleAuth, useLogin } from 'app/auth/hooks';
Expand Down
3 changes: 1 addition & 2 deletions packages/app/screens/map/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import {
TouchableOpacity,
} from 'react-native';
import Mapbox from '@rnmapbox/maps';
// get mapbox access token from .env file
import { MAPBOX_ACCESS_TOKEN } from '@env';
import { MAPBOX_ACCESS_TOKEN } from '@packrat/config';
import { FontAwesome, MaterialCommunityIcons } from '@expo/vector-icons';
import { theme } from 'app/theme';
import useTheme from 'app/hooks/useTheme';
Expand Down
2 changes: 1 addition & 1 deletion packages/app/screens/trip/TripDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { View } from 'react-native';
import { RText, RStack } from '@packrat/ui';
import { DetailsComponent } from '../../components/details';
import { Platform, StyleSheet, FlatList, Dimensions, Text } from 'react-native';
import { CLIENT_URL } from '@env';
import { CLIENT_URL } from '@packrat/config';
import useTheme from '../../hooks/useTheme';
import useCustomStyles from 'app/hooks/useCustomStyles';
import { useFetchSingleTrip, useTripWeather } from 'app/hooks/singletrips';
Expand Down
2 changes: 1 addition & 1 deletion packages/crosspath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"solito": "^4.2.0"
},
"devDependencies": {
"@tamagui/build": "^1.96.0",
"@tamagui/build": "1.96.0",
"typescript": "^5.3.3"
}
}
20 changes: 10 additions & 10 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@
"@shopify/flash-list": "^1.6.1",
"@tamagui-extras/core": "^1.12.2",
"@tamagui-extras/form": "^1.17.2",
"@tamagui/animations-react-native": "^1.96.0",
"@tamagui/font-inter": "^1.96.0",
"@tamagui/progress": "^1.96.0",
"@tamagui/react-native-media-driver": "^1.96.0",
"@tamagui/shorthands": "^1.96.0",
"@tamagui/switch": "^1.96.0",
"@tamagui/themes": "^1.96.0",
"@tamagui/toast": "^1.96.0",
"@tamagui/animations-react-native": "1.96.0",
"@tamagui/font-inter": "1.96.0",
"@tamagui/progress": "1.96.0",
"@tamagui/react-native-media-driver": "1.96.0",
"@tamagui/shorthands": "1.96.0",
"@tamagui/switch": "1.96.0",
"@tamagui/themes": "1.96.0",
"@tamagui/toast": "1.96.0",
"@tanstack/react-table": "^8.10.7",
"@tanstack/react-virtual": "3.0.0-beta.54",
"esbuild": "^0.19.5",
"expo-image-picker": "^14.7.1",
"jotai": "^2.6.4",
"react": "18.2.0",
"react-hook-form": "^7.50.1",
"tamagui": "^1.96.0",
"tamagui": "1.96.0",
"zeego": "^1.7.2"
},
"devDependencies": {
"@tamagui/build": "^1.96.0"
"@tamagui/build": "1.96.0"
}
}
Loading

0 comments on commit fc83f69

Please sign in to comment.