Skip to content

Commit

Permalink
Merge pull request #108 from shoutem/release/4.0.0
Browse files Browse the repository at this point in the history
Release/4.0.0 - master
  • Loading branch information
tomislav-arambasic authored Nov 1, 2021
2 parents 2f4ef2b + c090744 commit 9c47d94
Show file tree
Hide file tree
Showing 22 changed files with 134 additions and 128 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ indent_size = 2

[*.md]
trim_trailing_whitespace = false

# Windows files
[*.bat]
end_of_line = crlf
15 changes: 4 additions & 11 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*

; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/warning')
node_modules/warning/.*

; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js
[untyped]
Expand All @@ -32,8 +28,9 @@ node_modules/react-native/flow/
[options]
emoji=true

esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable
exact_by_default=true

format.bracket_spacing=false

module.file_ext=.js
module.file_ext=.json
Expand All @@ -51,10 +48,6 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

unsafe.enable_getters_and_setters=true

[lints]
Expand All @@ -79,4 +72,4 @@ untyped-import
untyped-type-import

[version]
^0.122.0
^0.158.0
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.pbxproj -text
# specific for windows script files
# Windows files should use crlf line endings
# https://help.github.com/articles/dealing-with-line-endings/
*.bat text eol=crlf
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
build-script/tmp
extensions.js
!preview-app/**/extensions.js
config.json
!preview-app/**/config.json
!app-center/config.json
temp
cached-bundles
Expand Down Expand Up @@ -101,6 +99,7 @@ ios/ShoutemApp/Images.xcassets/Image.imageset/background.png
.gradle
local.properties
*.iml
*.hprof

# node.js
#
Expand All @@ -113,7 +112,6 @@ buck-out/
\.buckd/
android/app/libs
*.keystore
!preview-app/**/*.keystore

# fastlane
#
Expand Down
26 changes: 16 additions & 10 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,20 @@ def jscFlavor = 'org.webkit:android-jsc:+'
*/
def enableHermes = project.ext.react.get("enableHermes", false)

/**
* Architectures to build native code for in debug.
*/
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")


android {
compileSdkVersion rootProject.ext.compileSdkVersion
ndkVersion rootProject.ext.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
compileSdkVersion rootProject.ext.compileSdkVersion

// untrackable dependency requires fresco 2.0.0
// fresco 2.0.0 uses androidx which crashes the app
configurations.all {
resolutionStrategy {
force 'com.facebook.fresco:fresco:1.13.0'
force 'com.facebook.fresco:fresco:2.5.0'
}
}

Expand Down Expand Up @@ -186,6 +187,11 @@ android {

debug {
manifestPlaceholders = [appName: "ShoutemApplicationName"]
if (nativeArchitectures) {
ndk {
abiFilters nativeArchitectures.split(',')
}
}
//NativeModuleInjectionMark-app-gradle-buildTypes-debug
}
}
Expand Down Expand Up @@ -223,7 +229,7 @@ dependencies {

implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.multidex:multidex:2.0.1"
implementation "com.facebook.fresco:animated-gif:1.13.0" // For animated GIFs
implementation "com.facebook.fresco:animated-gif:2.5.0" // For animated GIFs
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules

Expand Down Expand Up @@ -251,7 +257,7 @@ dependencies {
// Run this once to be able to run the application with BUCK
// puts all implementation dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
from configurations.implementation
into 'libs'
}

Expand Down
7 changes: 6 additions & 1 deletion android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<application android:usesCleartextTraffic="true" tools:targetApi="29" tools:ignore="GoogleAppIndexingWarning" />
<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
1 change: 0 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled" android:value="false"/>
<!--//NativeModuleInjectionMark-android-manifest-application-->
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
Expand Down
3 changes: 1 addition & 2 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:windowIsTranslucent">false</item>
</style>
</resources>
4 changes: 3 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.4")
classpath("com.android.tools.build:gradle:4.2.2")
//NativeModuleInjectionMark-root-gradle

// NOTE: Do not place your application dependencies here; they belong
Expand Down Expand Up @@ -34,6 +35,7 @@ allprojects {

google()
jcenter()
mavenCentral()
maven { url 'https://www.jitpack.io' }
}
}
3 changes: 2 additions & 1 deletion android/constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ project.ext {
compileSdkVersion = 30
targetSdkVersion = 30
minSdkVersion = 23
ndkVersion = '21.4.7075529'

buildToolsVersion = '29.0.2'
buildToolsVersion = '30.0.2'
supportLibVersion = '28.0.0'
googlePlayServicesVersion = '15.0.0'

Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android.useAndroidX=true
android.enableJetifier=true

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.54.0
FLIPPER_VERSION=0.99.0

#NativeModuleInjectionMark-gradle-properties

Expand Down
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Apr 12 13:55:51 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
19 changes: 3 additions & 16 deletions android/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand All @@ -54,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
Expand All @@ -64,19 +64,6 @@ echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
Expand All @@ -85,7 +72,7 @@ set CMD_LINE_ARGS=%*
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
13 changes: 10 additions & 3 deletions ios/Podfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,24 @@ install! 'cocoapods', :deterministic_uuids => false
target 'ShoutemApp' do
config = use_native_modules!

use_react_native!
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)

## <Extension dependencies>

end

## <Additional target>

use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' })
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
use_flipper!("Flipper" => "0.93.0", "Flipper-DoubleConversion" => "1.1.7")
post_install do |installer|
flipper_post_install(installer)
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1210"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
6 changes: 5 additions & 1 deletion ios/ShoutemApp/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

//NativeModuleInjectionMark-appDelegate-applicationDidFinishLaunchingWithOptions

rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
if (@available(iOS 13.0, *)) {
rootView.backgroundColor = [UIColor systemBackgroundColor];
} else {
rootView.backgroundColor = [UIColor whiteColor];
}

// Loading view that shows the launch screen while Javascript is reloading
UIView *loading = [[[NSBundle mainBundle] loadNibNamed:@"LaunchScreen" owner:self options:nil] objectAtIndex:0];
Expand Down
2 changes: 1 addition & 1 deletion metro.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { getDefaultConfig } = require('metro-config');
const blacklist = require('metro-config/src/defaults/blacklist');
const blacklist = require('metro-config/src/defaults/exclusionList');
const path = require('path');

// parameters adjusted by CI scripts
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shoutem/platform",
"version": "3.0.2",
"version": "4.0.0",
"scripts": {
"android": "react-native run-android",
"build": "node scripts/build",
Expand All @@ -20,9 +20,9 @@
"lodash": "~4.17.11",
"moment": "2.24.0",
"prop-types": "15.7.1",
"react": "16.13.1",
"react-native": "0.63.4",
"react-redux": "~5.0.2",
"react": "17.0.2",
"react-native": "0.66.0",
"react-redux": "^7.1.3",
"redux": "~3.6.0",
"redux-action-buffer": "~1.0.1",
"redux-api-middleware": "2.0.1",
Expand All @@ -32,28 +32,28 @@
"whatwg-fetch": "1.0.0"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/core": "^7.12.9",
"@babel/plugin-proposal-decorators": "^7.3.0",
"@babel/preset-env": "^7.3.4",
"@babel/preset-flow": "^7.0.0",
"@babel/runtime": "^7.8.4",
"@babel/runtime": "^7.12.5",
"@shoutem/build-tools": "file:scripts/helpers",
"@shoutem/eslint-config-react": "^1.0.1",
"babel-eslint": "^10.0.3",
"babel-jest": "^25.1.0",
"babel-jest": "^26.6.3",
"babel-plugin-jest-hoist": "^24.0.0",
"eslint": "^6.8.0",
"eslint": "7.14.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^1.3.1",
"eslint-plugin-prettier": "3.1.3",
"eslint-plugin-react": "^5.1.1",
"eslint-plugin-react-native": "~3.6.0",
"jest": "^25.1.0",
"jest": "^26.6.3",
"jetifier": "~1.6.6",
"metro-react-native-babel-preset": "^0.64.0",
"metro-react-native-babel-preset": "^0.66.2",
"patch-package": "^6.2.2",
"prettier": "1.19.1",
"react-test-renderer": "16.13.1"
"react-test-renderer": "17.0.2"
},
"eslintConfig": {
"extends": "@shoutem/react",
Expand Down
Loading

0 comments on commit 9c47d94

Please sign in to comment.