Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
05e6019
add jitpack yml and needed changes
dratwas Jul 16, 2020
86c8b19
add needed dependencies
dratwas Jul 16, 2020
b80e959
fix repositories
dratwas Jul 17, 2020
1e7d0b7
Merge branch 'feat/jitpack' of github.com:wordpress-mobile/react-nati…
dratwas Feb 22, 2021
3d08638
update dependencies
dratwas Feb 22, 2021
6c83188
Update to stable 0.64.0
cameronvoell May 13, 2021
e7b44cb
Update react-native mirror location from bintray to S3
cameronvoell May 21, 2021
94a5010
Merge pull request #1 from wordpress-mobile/upgrade-to-64
ceyhun Jun 21, 2021
33479a1
Point podspec source to fork repo
ceyhun Jun 21, 2021
fbbfc3c
Add -wp to version number
ceyhun Jun 21, 2021
5282a8f
Remove "v" prefix from source.tag in podspec
ceyhun Jun 22, 2021
bc6b2d3
Upgrade Gradle to 7.1.1
oguzkocer Aug 10, 2021
5c6d254
Use plugin DSL
oguzkocer Aug 10, 2021
a3727b8
Simplify android extension
oguzkocer Aug 10, 2021
46d73ee
Update repositories & dependencies
oguzkocer Aug 10, 2021
4776e67
Remove settings.gradle
oguzkocer Aug 10, 2021
7cec2af
Update lib/build.gradle
oguzkocer Aug 10, 2021
17727ed
Adds isStandaloneproject extension property and handles react-native …
oguzkocer Aug 10, 2021
9afe9fd
Adds maven-publish plugin
oguzkocer Aug 10, 2021
e75fec4
Remove jitpack.yml
oguzkocer Aug 10, 2021
1c81dc5
Merge pull request #5 from wordpress-mobile/upgrade-to-gradle-7.1.1
oguzkocer Aug 16, 2021
0b284c3
Specify exact TypeScript version
Aug 31, 2021
f1ae186
Merge pull request #6 from wordpress-mobile/fix/typescript-version
mchowning Aug 31, 2021
0490475
Use correct version number in package.json
ceyhun Sep 16, 2021
391b364
Add tarball file
ceyhun Sep 16, 2021
e20fb87
Merge pull request #7 from wordpress-mobile/try/tarball
fluiddot Sep 24, 2021
002f6d8
Update to RN 0.66.2
dcalhoun Nov 22, 2021
95e8195
Bump version
dcalhoun Nov 23, 2021
486e09b
Generate new tarball
dcalhoun Nov 23, 2021
d44984f
Merge pull request #8 from wordpress-mobile/chore/upgrade-to-react-na…
dcalhoun Nov 30, 2021
9353865
Merge branch 'software-mansion-2.2.0' into wp-fork-2.2.0
fluiddot Feb 8, 2022
3824c9f
Update yarn.lock
fluiddot Feb 8, 2022
c288c75
Generate new tarball
fluiddot Feb 8, 2022
ed03921
Fix build configuration
fluiddot Feb 8, 2022
0b184c3
Generate new tarball
fluiddot Feb 8, 2022
c612466
Update yarn.lock
fluiddot Feb 25, 2022
a2a55d4
Bump @types/react-native version to 0.64.0
fluiddot Feb 25, 2022
1746ad9
Generate tarball
fluiddot Feb 25, 2022
47425dd
Merge branch 'wp-fork' into wp-fork-2.2.0
fluiddot Feb 25, 2022
2cd38eb
Generate tarball
fluiddot Feb 25, 2022
ceed25b
Revert apply kotlin plugin
fluiddot Feb 25, 2022
71885ee
Add google repository and gradle dependency
fluiddot Feb 25, 2022
6be7849
Generate tarball
fluiddot Feb 25, 2022
812692f
Merge pull request #15 from wordpress-mobile/wp-fork-2.2.0
fluiddot Feb 28, 2022
cf182a2
Merge branch 'trunk' into wp-fork
fluiddot Feb 28, 2022
58f64aa
Disable upgrade notice on Jest environment
fluiddot Mar 1, 2022
40a449b
Bump package version to wp-2
fluiddot Mar 1, 2022
918c185
Generate tarball
fluiddot Mar 1, 2022
fd10ed9
Merge pull request #16 from wordpress-mobile/jest-disable-upgrade-notice
fluiddot Mar 1, 2022
c2db399
Exclude meta-inf files via packaging options
fluiddot Mar 2, 2022
ff8de14
Bump package version
fluiddot Mar 2, 2022
b38cb6a
Generate tarball
fluiddot Mar 2, 2022
0a03958
Merge pull request #17 from wordpress-mobile/exclude-meta-inf-file
fluiddot Mar 2, 2022
79ba0ec
Use common interface from reanimated
fluiddot Mar 15, 2022
cdd06c0
Bump version to wp-4
fluiddot Mar 15, 2022
6afff18
Generate tarball
fluiddot Mar 15, 2022
0630ab3
Merge pull request #18 from wordpress-mobile/prevent-reanimated-dupli…
fluiddot Mar 16, 2022
1a47138
Add Jitpack repository
fluiddot Mar 16, 2022
2094d9c
Merge branch 'wp-fork' into wp-fork-2.3.2
fluiddot Apr 8, 2022
ef4aae4
Fix build.gradle after solving merge conflicts
fluiddot Apr 8, 2022
d22132b
Generate tarball
fluiddot Apr 8, 2022
7049228
Fix @types/react-native version
fluiddot Apr 8, 2022
ffe2765
Merge pull request #20 from wordpress-mobile/wp-fork-2.3.2
fluiddot May 25, 2022
6060014
Merge branch 'trunk' into wp-fork
fluiddot May 25, 2022
cb545ca
Generate tarball
fluiddot May 25, 2022
feb6c39
Merge tag '2.5.0' into wp-fork-2.5.0
Sep 23, 2022
28d565f
Add back isStandaloneProject checks
Sep 23, 2022
40da5f5
Disables Fabric CI checks for Android
Sep 23, 2022
869734d
Update tarball
Sep 23, 2022
1b8264e
Update complieSdkVersion to 31
Sep 23, 2022
9434472
Update Tarball
Sep 23, 2022
3fafdab
Update Reanimated version to 2.9.1-wp-1
Oct 11, 2022
baa30e1
Update tarball
Oct 11, 2022
f40ebe3
Update Github action
Oct 11, 2022
429279e
Merge pull request #22 from wordpress-mobile/wp-fork-2.5.0
Oct 11, 2022
2f298e5
Merge branch 'trunk' into wp-fork
fluiddot Oct 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
working-directory: [example, FabricExample]
working-directory: [example]
concurrency:
group: android-${{ github.ref }}
cancel-in-progress: true
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ios-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
strategy:
matrix:
working-directory: [example, FabricExample]
xcode: ['13.2.1']
device: ['iPhone 13']
concurrency:
group: ios-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -29,6 +31,10 @@ jobs:
- name: Install pods
working-directory: ${{ matrix.working-directory }}/ios
run: pod install
- name: Switch Xcode version to ${{ matrix.xcode }}
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app
- name: Force update Launch Database to prevent issues when opening the Simulator app
run: /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer/Applications/Simulator.app
- name: Build app
working-directory: ${{ matrix.working-directory }}
run: yarn ios
2 changes: 1 addition & 1 deletion .github/workflows/static-example-apps-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
paths:
- 'example/**'
- 'FabricExample/**'
# - 'FabricExample/**'
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion RNGestureHandler.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Pod::Spec.new do |s|
s.homepage = "https://github.com/software-mansion/react-native-gesture-handler"
s.license = "MIT"
s.author = { package["author"]["name"] => package["author"]["email"] }
s.source = { :git => "https://github.com/software-mansion/react-native-gesture-handler", :tag => "#{s.version}" }
s.source = { :git => "https://github.com/wordpress-mobile/react-native-gesture-handler", :tag => "#{s.version}" }
s.source_files = "ios/**/*.{h,m,mm}"
s.requires_arc = true

Expand Down
72 changes: 60 additions & 12 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ import groovy.json.JsonSlurper
import java.nio.file.Paths

buildscript {
ext.isStandaloneProject = (project == rootProject)

def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['RNGH_kotlinVersion']

repositories {
mavenCentral()
google()
}

dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
}
}
Expand Down Expand Up @@ -40,10 +44,7 @@ if (isNewArchitectureEnabled()) {
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
apply plugin: 'maven-publish'

// Check whether Reanimated 2.3 or higher is installed alongside Gesture Handler
def shouldUseCommonInterfaceFromReanimated() {
Expand All @@ -55,16 +56,19 @@ def shouldUseCommonInterfaceFromReanimated() {
def (major, minor, patch) = reanimatedVersion.tokenize('.')
return (Integer.parseInt(major) == 2 && Integer.parseInt(minor) >= 3) || Integer.parseInt(major) == 3
} else {
return false
// In Gutenberg, we use a Reanimated version higher than 2.3. Therefore, we have to
// assure that the common interface is always used to prevent duplicating the class.
return true;
}
}

repositories {
mavenCentral()
google()
}

android {
compileSdkVersion safeExtGet("compileSdkVersion", 28)
compileSdkVersion 31

// Used to override the NDK path/version on internal CI or by allowing
// users to customize the NDK path/version from their root project (e.g. for M1 support)
Expand All @@ -76,8 +80,8 @@ android {
}

defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 28)
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName "1.0"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
Expand Down Expand Up @@ -119,6 +123,10 @@ android {
// only the ones that make the build fail (ideally we should only include librngesturehandler_modules but we
// are only allowed to specify exclude patterns)
exclude "**/libreact_render*.so"

// Exclude files to avoid 'duplicate files during packaging' errors
// when building an app that incorporates this package as a dependency
exclude 'META-INF/android_release.kotlin_module'
}

// Include "lib/" as sources, unfortunately react-native link can't handle
Expand Down Expand Up @@ -148,20 +156,48 @@ android {
}
}

def kotlin_version = safeExtGet('kotlinVersion', project.properties['RNGH_kotlinVersion'])
allprojects {
repositories {
if (isStandaloneProject) {
maven { url "https://a8c-libs.s3.amazonaws.com/android/react-native-mirror" }
} else {
// When building as a dep, the RN's maven repo is locally in the node_modules folder
def nodeModulesPath = "${project.buildDir}/../../node_modules/"
maven { url "${nodeModulesPath}/react-native/android" }
}

google()
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}

def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['RNGH_kotlinVersion']

dependencies {
//noinspection GradleDynamicVersion
if (isNewArchitectureEnabled()) {
implementation project(':ReactAndroid')
} else {
implementation 'com.facebook.react:react-native:+'
if (isStandaloneProject) {
// If this is the root project (e.g. Jitpack), specify a version
implementation 'com.facebook.react:react-native:0.69.4'
} else {
implementation 'com.facebook.react:react-native:+'
}
}

if (shouldUseCommonInterfaceFromReanimated()) {
// Include Reanimated as dependency to load the common interface
implementation (project(':react-native-reanimated')) {
exclude group:'com.facebook.fbjni' // resolves "Duplicate class com.facebook.jni.CppException"
if (isStandaloneProject) {
implementation ("com.github.wordpress-mobile:react-native-reanimated:2.9.1-wp-1") {
exclude group:'com.facebook.fbjni' // resolves "Duplicate class com.facebook.jni.CppException"
}
} else {
implementation (project(':react-native-reanimated')) {
exclude group:'com.facebook.fbjni' // resolves "Duplicate class com.facebook.jni.CppException"
}
}
}

Expand All @@ -179,3 +215,15 @@ if (isNewArchitectureEnabled()) {
codegenJavaPackageName = "com.swmansion.gesturehandler"
}
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = 'com.github.wordpress-mobile'
artifactId = 'react-native-gesture-handler'
}
}
}
}
23 changes: 6 additions & 17 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
# Project-wide Gradle settings.
org.gradle.jvmargs=-Xmx1536m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.useAndroidX=true
android.enableJetifier=true
RNGH_kotlinVersion=1.5.20
Binary file added android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading