Skip to content

Commit

Permalink
Update V1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pelixpng committed Oct 4, 2024
1 parent 181e30d commit 03766f4
Show file tree
Hide file tree
Showing 84 changed files with 2,739 additions and 2,242 deletions.
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ well as contribute images and information to the archive. You can read more
about the project [here](https://docs.pastvu.com/en/about). Platform source
[code](https://github.com/PastVu).

# System Requirements

- **Android:** 6.0 and up
- **iOS:** 13.4 and up
- **iPadOS:** Not supported currently
- **macOS:** 11.0 and up
- **visionOS:** 1.0 and up

# Android

<p align="center">
Expand All @@ -34,12 +42,6 @@ about the project [here](https://docs.pastvu.com/en/about). Platform source
<img src="img/6.png" width="250" />
</p>

<p align="center">
<img src="img/7.png" width="250" />
<img src="img/8.png" width="250" />
<img src="img/9.png" width="250" />
</p>

# IOS

<p align="center">
Expand All @@ -61,16 +63,10 @@ about the project [here](https://docs.pastvu.com/en/about). Platform source
- The map API is provided by the [Google Maps
platform](https://developers.google.com/maps) and Apple Maps.

# Plans
# Project team

- Add other maps providers
- Add English language support;
- Optimize marker placement;
- Add the news section;
- Add functionality to translate posts;
- Add the settings reset button;
- Add cache management;
- Add animations;
1. [**Semyon Kuzmin**](https://github.com/pelixpng) - Application creator, development, testing.
2. [**Artem Kostyuchenko**](https://t.me/ArtemWaves) - Designer.

# License

Expand Down
35 changes: 32 additions & 3 deletions code/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ apply plugin: "com.facebook.react"

def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath()

static def versionToNumber(major, minor, patch) {
return patch * 100 + minor * 10000 + major * 1000000
}

def getRNVersion() {
def version = providers.exec {
workingDir(projectDir)
commandLine("node", "-e", "console.log(require('react-native/package.json').version);")
}.standardOutput.asText.get().trim()

def coreVersion = version.split("-")[0]
def (major, minor, patch) = coreVersion.tokenize('.').collect { it.toInteger() }

return versionToNumber(
major,
minor,
patch
)
}
def rnVersion = getRNVersion()

/**
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
Expand Down Expand Up @@ -57,6 +78,11 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]

if (rnVersion >= versionToNumber(0, 75, 0)) {
/* Autolinking */
autolinkLibrariesWithApp()
}
}

/**
Expand Down Expand Up @@ -89,7 +115,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 10
versionName "1.7.0"
versionName "1.8.0"
}
signingConfigs {
debug {
Expand All @@ -110,6 +136,7 @@ android {
shrinkResources (findProperty('android.enableShrinkResourcesInReleaseBuilds')?.toBoolean() ?: false)
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
crunchPngs (findProperty('android.enablePngCrunchInReleaseBuilds')?.toBoolean() ?: true)
}
}
packagingOptions {
Expand Down Expand Up @@ -168,5 +195,7 @@ dependencies {
}
}

apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
applyNativeModulesAppBuildGradle(project)
if (rnVersion < versionToNumber(0, 75, 0)) {
apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
applyNativeModulesAppBuildGradle(project)
}
2 changes: 1 addition & 1 deletion code/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</intent>
</queries>
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:requestLegacyExternalStorage="true">
<meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR_GOOGLE_MAPS_API_KEY"/>
<meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR API KEY"/>
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
<meta-data android:name="expo.modules.updates.EXPO_RUNTIME_VERSION" android:value="@string/expo_runtime_version"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
Expand Down
2 changes: 1 addition & 1 deletion code/android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<item name="android:editTextStyle">@style/ResetEditText</item>
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:statusBarColor">#2D61A0</item>
</style>
<style name="ResetEditText" parent="@android:style/Widget.EditText">
<item name="android:padding">0dp</item>
Expand Down
3 changes: 3 additions & 0 deletions code/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

# Enable AAPT2 PNG crunching
android.enablePngCrunchInReleaseBuilds=true

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
Expand Down
Binary file modified code/android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion code/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
19 changes: 19 additions & 0 deletions code/android/react-settings-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.9.24"
id("java-gradle-plugin")
}

repositories {
mavenCentral()
}

gradlePlugin {
plugins {
create("reactSettingsPlugin") {
id = "com.facebook.react.settings"
implementationClass = "expo.plugins.ReactSettingsPlugin"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package expo.plugins

import org.gradle.api.Plugin
import org.gradle.api.initialization.Settings

class ReactSettingsPlugin : Plugin<Settings> {
override fun apply(settings: Settings) {
// Do nothing, just register the plugin.
}
}
52 changes: 50 additions & 2 deletions code/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
pluginManagement {
def version = providers.exec {
commandLine("node", "-e", "console.log(require('react-native/package.json').version);")
}.standardOutput.asText.get().trim()
def (_, reactNativeMinor, reactNativePatch) = version.split("-")[0].tokenize('.').collect { it.toInteger() }

includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile().toString())
if(reactNativeMinor == 74 && reactNativePatch <= 3){
includeBuild("react-settings-plugin")
}
}

plugins { id("com.facebook.react.settings") }

def getRNMinorVersion() {
def version = providers.exec {
commandLine("node", "-e", "console.log(require('react-native/package.json').version);")
}.standardOutput.asText.get().trim()

def coreVersion = version.split("-")[0]
def (major, minor, patch) = coreVersion.tokenize('.').collect { it.toInteger() }

return minor
}

if (getRNMinorVersion() >= 75) {
extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
if (System.getenv('EXPO_UNSTABLE_CORE_AUTOLINKING') == '1') {
println('\u001B[32mUsing expo-modules-autolinking as core autolinking source\u001B[0m')
def command = [
'node',
'--no-warnings',
'--eval',
'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))',
'react-native-config',
'--json',
'--platform',
'android'
].toList()
ex.autolinkLibrariesFromCommand(command)
} else {
ex.autolinkLibrariesFromCommand()
}
}
}

rootProject.name = 'PastVu'

dependencyResolutionManagement {
Expand All @@ -11,8 +57,10 @@ dependencyResolutionManagement {
apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle");
useExpoModules()

apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
applyNativeModulesSettingsGradle(settings)
if (getRNMinorVersion() < 75) {
apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), "../native_modules.gradle");
applyNativeModulesSettingsGradle(settings)
}

include ':app'
includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile())
13 changes: 9 additions & 4 deletions code/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"expo": {
"name": "PastVu",
"slug": "PastVuApp",
"version": "1.7.0",
"version": "1.8.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
Expand All @@ -16,13 +16,18 @@
"supportsTablet": false,
"userInterfaceStyle": "automatic",
"bundleIdentifier": "com.pelixpng.PastVuApp",
"buildNumber": "16"
"buildNumber": "19",
"config": {
"googleMaps": {
"apiKey": "YOUR API KEY"
}
}
},
"android": {
"softwareKeyboardLayoutMode": "pan",
"config": {
"googleMaps": {
"apiKey": "YOUR_GOOGLE_MAPS_API_KEY"
"apiKey": "YOUR API KEY"
}
},
"adaptiveIcon": {
Expand All @@ -45,7 +50,7 @@
[
"expo-media-library",
{
"savePhotosPermission": "Это позволяет сохранять фото в фотопленку.",
"savePhotosPermission": "Мы запрашиваем доступ для сохранения изображений в вашу фотогалерею, чтобы вы могли добавлять загруженные фотографии для дальнейшего просмотра и использования.",
"isAccessMediaLocationEnabled": false
}
],
Expand Down
3 changes: 2 additions & 1 deletion code/eas.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"cli": {
"version": ">= 3.15.0",
"promptToConfigurePushNotifications": false
"promptToConfigurePushNotifications": false,
"appVersionSource": "remote"
},
"build": {
"preview": {
Expand Down
Loading

0 comments on commit 03766f4

Please sign in to comment.