Skip to content

Commit

Permalink
Merge pull request joltup#1 from cipolleschi/feat/add_js_specs
Browse files Browse the repository at this point in the history
[FEAT] Add Flow specs - New Arch Migration 1/n
  • Loading branch information
cipolleschi authored Sep 30, 2022
2 parents f515ccc + bb23f10 commit 6378035
Show file tree
Hide file tree
Showing 190 changed files with 4,769 additions and 26,660 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ codecov.yml
# Example
img/
example/
examples/
app.json

# Android
Expand Down
5 changes: 2 additions & 3 deletions android.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.

import { NativeModules, Platform } from 'react-native';

const ReactNativeBlobUtil = NativeModules.ReactNativeBlobUtil;
import { Platform } from 'react-native';
import ReactNativeBlobUtil from './codegenSpecs/NativeBlobUtils';

/**
* Send an intent to open the file.
Expand Down
20 changes: 19 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:7.2.1'
}
}
}

def isNewArchitectureEnabled() {
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
}

if (isNewArchitectureEnabled()) {
apply plugin: 'com.facebook.react'
}

android {
compileSdkVersion safeExtGet('compileSdkVersion', 30)
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
Expand All @@ -43,6 +51,7 @@ android {
targetSdkVersion safeExtGet('targetSdkVersion', 30)
versionCode 1
versionName "1.0"
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
}
buildTypes {
release {
Expand All @@ -55,6 +64,15 @@ android {
}
productFlavors {
}
sourceSets {
main {
if (isNewArchitectureEnabled()) {
java.srcDirs += ['src/newarch']
} else {
java.srcDirs += ['src/oldarch']
}
}
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
Empty file modified android/gradlew
100644 → 100755
Empty file.
Loading

0 comments on commit 6378035

Please sign in to comment.