Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .buildkite/jobs/pipeline.publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
if: "build.pull_request.id == null"
command:
- "nvm install"
- "npm install"
- "npm run release"
- "./scripts/ci.sh"
- "yarn run release"
depends_on:
- ios
- android
Expand Down
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,18 @@ website/package-lock.json
artifacts/

# Navigation mocks
lib/Mock/*.js
lib/Mock/*.d.ts
lib/*
Mock.js
Mock.d.ts

Gemfile.lock
/playground/ios/.xcode.env.local

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules
nmHoistingLimits: workspaces

8 changes: 4 additions & 4 deletions ReactNativeNavigation.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'

# Detect if this is a Swift project by looking for user AppDelegate.swift files
start_dir = File.expand_path('../../', __dir__)
start_dir = File.expand_path('../', __dir__)
swift_delegate_path = nil
Find.find(start_dir) do |path|
if path =~ /AppDelegate\.swift$/
Expand Down Expand Up @@ -39,12 +39,12 @@ Pod::Spec.new do |s|

s.subspec 'Core' do |ss|
s.source = { :git => "https://github.com/wix/react-native-navigation.git", :tag => "#{s.version}" }
s.source_files = 'lib/ios/**/*.{h,m,mm,cpp}'
s.exclude_files = "lib/ios/ReactNativeNavigationTests/**/*.*", "lib/ios/OCMock/**/*.*"
s.source_files = 'ios/**/*.{h,m,mm,cpp}'
s.exclude_files = "ios/ReactNativeNavigationTests/**/*.*", "lib/ios/OCMock/**/*.*"
# Only expose headers for Swift projects
if swift_project
s.public_header_files = [
'lib/ios/RNNAppDelegate.h'
'ios/RNNAppDelegate.h'
]
end
end
Expand Down
146 changes: 0 additions & 146 deletions android/app/build.gradle

This file was deleted.

140 changes: 132 additions & 8 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
import groovy.json.JsonSlurper
import org.gradle.api.tasks.testing.logging.TestExceptionFormat

buildscript {
ext {
Expand All @@ -21,13 +22,13 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath("com.facebook.react:react-native-gradle-plugin")
classpath 'com.android.tools.build:gradle'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
mavenCentral()
maven { url "$rootDir/../../node_modules/detox/Detox-android" }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
flatDir {
Expand All @@ -36,12 +37,135 @@ allprojects {
}
}

subprojects {
afterEvaluate { p ->
if (p.hasProperty('android')) {
android {
buildToolsVersion rootProject.ext.buildToolsVersion
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: "com.facebook.react"


def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

def safeExtGetFallbackLowerBound(prop, fallback) {
Math.max(safeExtGet(prop, fallback), fallback)
}

def DEFAULT_COMPILE_SDK_VERSION = 35
def DEFAULT_MIN_SDK_VERSION = 24
def DEFAULT_TARGET_SDK_VERSION = 35
def DEFAULT_KOTLIN_VERSION = "1.5.31"
def DEFAULT_KOTLIN_STDLIB = 'kotlin-stdlib-jdk8'
def DEFAULT_BUILD_TOOLS_VERSION = "35.0.0"
def kotlinVersion = safeExtGet("RNNKotlinVersion", DEFAULT_KOTLIN_VERSION)
def kotlinStdlib = safeExtGet('RNNKotlinStdlib', DEFAULT_KOTLIN_STDLIB)
def kotlinCoroutinesCore = safeExtGet('RNNKotlinCoroutinesCore', '1.5.2')
def _buildToolsVersion = safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)

android {
namespace 'com.reactnativenavigation'
compileSdkVersion safeExtGetFallbackLowerBound('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
buildToolsVersion = _buildToolsVersion
defaultConfig {
minSdkVersion safeExtGetFallbackLowerBound('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
targetSdkVersion safeExtGetFallbackLowerBound('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
}
debug {
minifyEnabled false
}
}
lintOptions {
abortOnError false
}

testOptions {
managedDevices {
localDevices {
pixel3aapi34 {
device = "Pixel 3a"
apiLevel = 34
systemImageSource = "aosp-atd"
}
}
}
unitTests.includeAndroidResources = true
unitTests.all { t ->
maxHeapSize = "4g"
testLogging {
events "PASSED", "SKIPPED", "FAILED"
exceptionFormat TestExceptionFormat.FULL
showExceptions true
showCauses true
showStackTraces true
}
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
def output = " ${result.resultType} (${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped) "
def repeatLength = output.length()
println '\n\n' + ('-' * repeatLength) + '\n' + output + '\n' + ('-' * repeatLength) + '\n'

println "see report at file://${t.reports.html.outputLocation}/index.html"
}
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
}

dependencies {
implementation "androidx.core:core-ktx:1.6.0"
implementation "org.jetbrains.kotlin:$kotlinStdlib:$kotlinVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinCoroutinesCore"
implementation "androidx.constraintlayout:constraintlayout:2.0.4"

implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.annotation:annotation:1.2.0'
implementation 'com.google.android.material:material:1.2.0-alpha03'

implementation 'com.github.wix-playground:ahbottomnavigation:4.0.0'
implementation 'com.github.Dimezis:BlurView:version-3.0.0'
implementation 'com.github.wix-playground:reflow-animator:1.0.6'
implementation 'com.github.clans:fab:1.6.4'

//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+'

if ("Playground".toLowerCase() == rootProject.name.toLowerCase()) {
// tests only for our playground
testImplementation 'junit:junit:4.13.2'
testImplementation "org.robolectric:robolectric:4.14.1"
testImplementation 'org.assertj:assertj-core:3.11.1'
testImplementation 'org.mockito:mockito-core:4.0.0'
testImplementation 'com.squareup.assertj:assertj-android:1.2.0'
testImplementation 'org.mockito:mockito-inline:4.6.1'
testImplementation "org.mockito.kotlin:mockito-kotlin:4.0.0"
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlinVersion"

// Core testing libraries
androidTestImplementation "androidx.test.ext:junit:1.2.1"
androidTestImplementation 'org.assertj:assertj-core:3.11.1'

androidTestImplementation "androidx.test.espresso:espresso-core:3.6.1"

androidTestImplementation "com.linkedin.dexmaker:dexmaker-mockito-inline:2.28.4"
androidTestImplementation 'org.opentest4j:opentest4j:1.2.0'
androidTestImplementation ("org.mockito.kotlin:mockito-kotlin:5.4.0") {
exclude group: 'org.mockito', module: 'mockito-core'
}

androidTestImplementation "androidx.test.uiautomator:uiautomator:2.3.0"

androidTestImplementation("com.facebook.react:hermes-android")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.shell.MainReactPackage
import com.reactnativenavigation.react.NavigationPackage
import com.reactnativenavigation.NavigationPackage
import com.reactnativenavigation.react.NavigationReactNativeHost

class TestApplication : NavigationApplication() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void onCreate() {
* of {@link ReactGateway}. For example, subclasses may wish to provide a custom {@link ReactNativeHost}
* with the ReactGateway. This method will be called exactly once, in the application's {@link #onCreate()} method.
*
* Custom {@link ReactNativeHost}s must be sure to include {@link com.reactnativenavigation.react.NavigationPackage}
* Custom {@link ReactNativeHost}s must be sure to include {@link com.reactnativenavigation.NavigationPackage}
*
* @return a singleton {@link ReactGateway}
*/
Expand Down
Loading
Loading