Skip to content

Commit 88e996e

Browse files
committed
Merge branch 'dev-0.10'
2 parents 2a5969e + d4dc597 commit 88e996e

File tree

69 files changed

+14466
-35979
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+14466
-35979
lines changed

.circleci/config.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ jobs:
1010
- checkout
1111
- run: git submodule update --init --recursive
1212
- restore_cache:
13-
key: node-modules-{{ checksum "package-lock.json" }}-{{ checksum "example/package-lock.json" }}
14-
- run: npm install
15-
- run: npm run bootstrap
13+
key: node-modules-{{ checksum "yarn.lock" }}
14+
- run: yarn install
1615
- save_cache:
17-
key: node-modules-{{ checksum "package-lock.json" }}-{{ checksum "example/package-lock.json" }}
16+
key: node-modules-{{ checksum "yarn.lock" }}
1817
paths:
1918
- node_modules
2019
- example/node_modules
21-
- run: npm test
20+
- run: yarn test
2221
- persist_to_workspace:
2322
root: .
2423
paths:

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ DerivedData
2828
*.ipa
2929
*.xcuserstate
3030
project.xcworkspace
31+
**/.xcode.env.local
3132

3233
# Android/IJ
3334
#
@@ -61,6 +62,14 @@ buck-out/
6162
android/app/libs
6263
android/keystores/debug.keystore
6364

65+
# Yarn
66+
.yarn/*
67+
!.yarn/patches
68+
!.yarn/plugins
69+
!.yarn/releases
70+
!.yarn/sdks
71+
!.yarn/versions
72+
6473
# Expo
6574
.expo/
6675

@@ -71,4 +80,4 @@ android/keystores/debug.keystore
7180
lib/
7281

7382
# Other
74-
/dr.pogodin-react-native-static-server-*.tgz
83+
/package.tgz

.npmignore

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
.*
1+
**/.*
2+
**/__fixtures__
3+
**/__mocks__
4+
**/__tests__
25
android/build
6+
android/gradle
7+
android/gradlew
8+
android/gradlew.bat
9+
android/local.properties
310
build
411
dr.pogodin-react-native-static-server-*.tgz
512
/example/
613
ios/build
7-
node_modules
14+
node_modules

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.9.0
1+
v18

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Lines changed: 541 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.6.1.cjs

Lines changed: 874 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
nodeLinker: node-modules
2+
nmHoistingLimits: workspaces
3+
4+
plugins:
5+
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
6+
spec: "@yarnpkg/plugin-interactive-tools"
7+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
8+
spec: "@yarnpkg/plugin-workspace-tools"
9+
10+
yarnPath: .yarn/releases/yarn-3.6.1.cjs

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22

3-
_Copyright © 2022–2023, Dr. Sergey Pogodin_
3+
_Copyright © 2022–2024, Dr. Sergey Pogodin_
44
&mdash; <[email protected]> (https://dr.pogodin.studio) \
55
_Copyright &copy; 2017, futurepress_
66

android/build.gradle

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
buildscript {
2+
// Buildscript is evaluated before everything else so we can't use getExtOrDefault
3+
def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["ReactNativeStaticServer_kotlinVersion"]
4+
25
repositories {
36
google()
47
mavenCentral()
58
}
69

710
dependencies {
811
classpath "com.android.tools.build:gradle:7.2.1"
12+
// noinspection DifferentKotlinGradleVersion
13+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
914
}
1015
}
1116

@@ -14,9 +19,7 @@ def isNewArchitectureEnabled() {
1419
}
1520

1621
apply plugin: "com.android.library"
17-
18-
19-
def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
22+
apply plugin: "kotlin-android"
2023

2124
if (isNewArchitectureEnabled()) {
2225
apply plugin: "com.facebook.react"
@@ -30,7 +33,26 @@ def getExtOrIntegerDefault(name) {
3033
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["ReactNativeStaticServer_" + name]).toInteger()
3134
}
3235

36+
def supportsNamespace() {
37+
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
38+
def major = parsed[0].toInteger()
39+
def minor = parsed[1].toInteger()
40+
41+
// Namespace support was added in 7.3.0
42+
return (major == 7 && minor >= 3) || major >= 8
43+
}
44+
3345
android {
46+
if (supportsNamespace()) {
47+
namespace "com.drpogodin.reactnativestaticserver"
48+
49+
sourceSets {
50+
main {
51+
manifest.srcFile "src/main/AndroidManifestNew.xml"
52+
}
53+
}
54+
}
55+
3456
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
3557

3658
defaultConfig {
@@ -55,6 +77,10 @@ android {
5577
}
5678
}
5779

80+
buildFeatures {
81+
buildConfig true
82+
}
83+
5884
buildTypes {
5985
release {
6086
minifyEnabled false
@@ -91,12 +117,14 @@ repositories {
91117
google()
92118
}
93119

120+
def kotlin_version = getExtOrDefault("kotlinVersion")
94121

95122
dependencies {
96123
// For < 0.71, this will be from the local maven repo
97124
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
98125
//noinspection GradleDynamicVersion
99126
implementation "com.facebook.react:react-native:+"
127+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
100128
}
101129

102130
if (isNewArchitectureEnabled()) {

0 commit comments

Comments
 (0)