Skip to content

Commit

Permalink
Release 17.2.0 (#549)
Browse files Browse the repository at this point in the history
* CHANGELOG

* Run version update script

* Update Android and iOS to latest airship framework proxy

* Add tip to example README

* Migrate from react-native 0.71.1 to 0.73.4

* Get examples running

* Update CHANGELOG date

* Update ci.yml

Update Xcode and print cocoapods version

* Update gemfile

* Try avoiding pod-install npm package

* Update node version

* Try pod install in ci script

* Try explicitly installing cocoapods 1.15.2 and ruby 3.0.1

* Update ci.yml to run ios first

* Update java version in ci.yml

---------

Co-authored-by: crow <[email protected]>
  • Loading branch information
crow and crow committed Feb 19, 2024
1 parent 8e42c11 commit 218bfe9
Show file tree
Hide file tree
Showing 44 changed files with 18,475 additions and 30,199 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ jobs:
runs-on: macos-13-xlarge
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_15.0.1.app/Contents/Developer'
java-version: '17'

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.1'

- name: Install CocoaPods
run: gem install cocoapods -v '1.15.2'

- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_15.2.app/Contents/Developer'

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -24,5 +31,5 @@ jobs:
cache: 'npm'

- run: npm run bootstrap
- run: bash ./scripts/run_ci_tasks.sh -a
- run: bash ./scripts/run_ci_tasks.sh -i
- run: bash ./scripts/run_ci_tasks.sh -a
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.18.1
21.6.1
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# React Native Module Changelog

## Version 17.2.0 - February 15, 2024
Minor release that updates the iOS SDK to 17.7.3 and Android SDK to 17.7.2, modernizes the podspec and updates NPM dependencies flagged during security audit.

### Changes
- Updated iOS SDK to 17.7.3
- Updated Android SDK to 17.7.2
- Adds `install_modules_dependencies` to podspec to support for the latest react-native 0.73.3
- Updates NPM dependencies to address security audit

## Version 17.1.1 - December 6, 2023
Patch release that fixes missing annotations on feature flag methods, makes the `airshipHmsEnabled` flag available and updates examples.

Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Airship_targetSdkVersion=31
Airship_compileSdkVersion=31
Airship_ndkversion=21.4.7075529

Airship_airshipProxyVersion=5.1.0
Airship_airshipProxyVersion=5.1.1

# workaround for now, used for HMS
Airship_airshipVersion=17.6.0
Expand Down
2 changes: 1 addition & 1 deletion example/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
extends: '@react-native',
};
3 changes: 3 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ buck-out/

# CocoaPods
/ios/Pods/

# testing
/coverage
1 change: 0 additions & 1 deletion example/.node-version

This file was deleted.

1 change: 0 additions & 1 deletion example/.ruby-version

This file was deleted.

9 changes: 6 additions & 3 deletions example/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby File.read(File.join(__dir__, '.ruby-version')).strip

gem 'cocoapods', '~> 1.11', '>= 1.11.3'
ruby ">= 3.0.1"

# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.15.2', '< 1.16'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Airship.takeOff({

### iOS

1) Run `pod install --repo-update` in `example/ios`
1) Run `pod install --repo-update` in `example/ios`. If you receive an error, try deleting the Podfile.lock and re-installing.

2) Start the webserver in the top-level directory by running `npx react-native start`

Expand Down
62 changes: 7 additions & 55 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"

import com.android.build.OutputFile

/**
* 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 All @@ -13,8 +12,9 @@ react {
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
// codegenDir = file("../node_modules/react-native-codegen")

// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")

Expand Down Expand Up @@ -52,14 +52,6 @@ react {
// hermesFlags = ["-O", "-output-source-map"]
}

/**
* Set this to true to create four separate APKs instead of one,
* one for each native architecture. This is useful if you don't
* use App Bundles (https://developer.android.com/guide/app-bundle/)
* and want to have separate APKs to upload to the Play Store.
*/
def enableSeparateBuildPerCPUArchitecture = false

/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
Expand All @@ -78,20 +70,11 @@ def enableProguardInReleaseBuilds = false
*/
def jscFlavor = 'org.webkit:android-jsc:+'

/**
* Private function to get the list of Native Architectures you want to build.
* This reads the value from reactNativeArchitectures in your gradle.properties
* file and works together with the --active-arch-only flag of react-native run-android.
*/
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

android {
ndkVersion rootProject.ext.ndkVersion

compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

namespace "com.urbanairship.sample"
defaultConfig {
Expand All @@ -102,51 +85,20 @@ android {
versionName "1.0"
}

splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include (*reactNativeArchitectures())
}
}
buildTypes {
debug {}
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}

// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}

}
}
}

dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation("com.facebook.react:flipper-integration")

implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}

debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
Expand Down
6 changes: 1 addition & 5 deletions example/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

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

<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
tools:ignore="GoogleAppIndexingWarning"/>
</manifest>

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.urbanairship.sample

import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate

class MainActivity : ReactActivity() {
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "AirshipExample"
/**
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
}
Loading

0 comments on commit 218bfe9

Please sign in to comment.