Compare commits
2 Commits
69922b795a
...
ea5bd393c6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea5bd393c6 | ||
|
|
40b79764ae |
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@navsea/maplibre-particle-rn": "https://pbf.jpcn.ccwu.cc/npm/navsea-maplibre-particle-rn-13.4.1-particle.13.tgz",
|
||||
"@maplibre/maplibre-react-native": "11.3.6",
|
||||
"@maplibre/maplibre-react-native": "11.5.0",
|
||||
"expo": "56.0.4",
|
||||
"expo-asset": "~56.0.14",
|
||||
"expo-file-system": "56.0.11",
|
||||
|
||||
@@ -6,7 +6,7 @@ const marker = "// MapLibreParticleRNTestHost NavSea Particle release SDK";
|
||||
module.exports = function withParticleNativeAndroid(config) {
|
||||
return withProjectBuildGradle(config, (project) => {
|
||||
if (project.modResults.contents.includes(marker)) return project;
|
||||
project.modResults.contents += `\n${marker}\ngradle.projectsEvaluated {\n allprojects { p ->\n p.repositories.maven { repository -> repository.url = p.uri("https://pbf.jpcn.ccwu.cc/maven") }\n p.configurations.configureEach { configuration ->\n configuration.resolutionStrategy.dependencySubstitution {\n substitute module("org.maplibre.gl:android-sdk-opengl") using module("cc.navsea.maplibre:android-sdk-particle-opengl:13.4.1-particle.21")\n }\n }\n }\n}\nrootProject.ext.set("org.maplibre.reactnative.nativeVersion", "13.4.1")\nrootProject.ext.set("org.maplibre.reactnative.nativeVariant", "opengl")\n`;
|
||||
project.modResults.contents += `\n${marker}\ngradle.projectsEvaluated {\n allprojects { p ->\n p.repositories.maven { repository -> repository.url = p.uri("https://pbf.jpcn.ccwu.cc/maven") }\n p.configurations.configureEach { configuration ->\n configuration.resolutionStrategy.dependencySubstitution {\n substitute module("org.maplibre.gl:android-sdk-opengl") using module("cc.navsea.maplibre:android-sdk-particle-opengl:13.6.1-particle.22")\n }\n }\n }\n}\nrootProject.ext.set("org.maplibre.reactnative.nativeVersion", "13.6.1")\nrootProject.ext.set("org.maplibre.reactnative.nativeVariant", "opengl")\n`;
|
||||
return project;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 13.6.1-particle.22(Android / iOS 统一发行)
|
||||
|
||||
- Mac unified release pipeline 统一生成 Android Native、RN package 与 iOS SwiftPM/XCFramework;共享 Particle revision 22。
|
||||
## 13.4.1-particle.21(Android / iOS 统一发行)
|
||||
|
||||
- Mac unified release pipeline 统一生成 Android Native、RN package 与 iOS SwiftPM/XCFramework;共享 Particle revision 21。
|
||||
|
||||
@@ -9,7 +9,7 @@ $MLRN_PARTICLE = Object.new
|
||||
|
||||
def $MLRN_PARTICLE.post_install(installer)
|
||||
unless defined?($MLRN) && $MLRN.respond_to?(:_add_spm_to_target)
|
||||
raise "MapLibreParticleRN requires MapLibreReactNative's $MLRN._add_spm_to_target helper. Ensure MapLibreReactNative 11.3.6 is installed before calling $MLRN_PARTICLE.post_install."
|
||||
raise "MapLibreParticleRN requires MapLibreReactNative's $MLRN._add_spm_to_target helper. Ensure MapLibreReactNative 11.5.0 is installed before calling $MLRN_PARTICLE.post_install."
|
||||
end
|
||||
|
||||
unless defined?($MLRN_SPM_SPEC) && $MLRN_SPM_SPEC.is_a?(Hash)
|
||||
@@ -44,7 +44,7 @@ Pod::Spec.new do |s|
|
||||
s.platforms = { :ios => "15.1" }
|
||||
s.source = { :git => package.dig("repository", "url"), :tag => s.version.to_s }
|
||||
s.source_files = "ios/**/*.{h,m,mm,cpp}"
|
||||
s.dependency "MapLibreReactNative", "11.3.6"
|
||||
s.dependency "MapLibreReactNative", "11.5.0"
|
||||
# $MLRN_PARTICLE.post_install reuses MapLibreReactNative's one MapLibre SPM
|
||||
# product. Do not declare a MapLibre pod, vendored framework, or SPM product here.
|
||||
install_modules_dependencies(s)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# @navsea/maplibre-particle-rn
|
||||
|
||||
当前版本:`13.4.1-particle.21`。Android Native 必须配套 `cc.navsea.maplibre:android-sdk-particle-opengl:13.4.1-particle.21`。本包是 React Native 的薄控制面,不负责 Map 组件、provider、HTTP、manifest、下载、缓存或 NavSea 业务策略。
|
||||
当前版本:`13.6.1-particle.22`。Android Native 必须配套 `cc.navsea.maplibre:android-sdk-particle-opengl:13.6.1-particle.22`。本包是 React Native 的薄控制面,不负责 Map 组件、provider、HTTP、manifest、下载、缓存或 NavSea 业务策略。
|
||||
|
||||
## 当前推荐主链:QBIN V4
|
||||
|
||||
@@ -24,11 +24,11 @@ V4 主要公共方法:`submitEncodedField`、`setEncodedColorBinding`、`setEn
|
||||
|
||||
## Map / Camera
|
||||
|
||||
Map 与 Camera 直接从 `@maplibre/maplibre-react-native@11.3.6` 使用。本包把 MLRN 作为 peer dependency,不转导出 MapLibre React Native。
|
||||
Map 与 Camera 直接从 `@maplibre/maplibre-react-native@11.5.0` 使用。本包把 MLRN 作为 peer dependency,不转导出 MapLibre React Native。
|
||||
|
||||
## iOS 集成
|
||||
|
||||
autolinking 使用 `MapLibreParticleRN.podspec` 和 RN codegen 的 `WeatherRuntimeBridge` provider。pod 只依赖 `MapLibreReactNative`,不声明、链接或嵌入第二份 `MapLibre.framework`。Consumer 必须以 MLRN 11.3.6 的 `$MLRN_SPM_SPEC` 配置同一个 custom `MapLibre` product;Particle pod 不接受独立 MapLibre binary。
|
||||
autolinking 使用 `MapLibreParticleRN.podspec` 和 RN codegen 的 `WeatherRuntimeBridge` provider。pod 只依赖 `MapLibreReactNative`,不声明、链接或嵌入第二份 `MapLibre.framework`。Consumer 必须以 MLRN 11.5.0 的 `$MLRN_SPM_SPEC` 配置同一个 custom `MapLibre` product;Particle pod 不接受独立 MapLibre binary。
|
||||
|
||||
Podfile 的 `post_install do |installer|` 必须同时调用 `$MLRN.post_install(installer)` 与 `$MLRN_PARTICLE.post_install(installer)`。两者复用同一个 `$MLRN_SPM_SPEC`:前者接入 MLRN/App,后者将同一 package reference/product 加到 `MapLibreParticleRN` pod target。Expo plugin 会幂等注入后一个调用;它不设置 `$MLRN_SPM_SPEC`,该值仍由 MLRN 官方 plugin 或宿主 Podfile 提供。
|
||||
|
||||
@@ -37,7 +37,7 @@ Podfile 的 `post_install do |installer|` 必须同时调用 `$MLRN.post_install
|
||||
RN tgz:
|
||||
|
||||
```text
|
||||
https://pbf.jpcn.ccwu.cc/npm/navsea-maplibre-particle-rn-13.4.1-particle.21.tgz
|
||||
https://pbf.jpcn.ccwu.cc/npm/navsea-maplibre-particle-rn-13.6.1-particle.22.tgz
|
||||
```
|
||||
|
||||
Native Maven repository:
|
||||
@@ -49,7 +49,7 @@ https://pbf.jpcn.ccwu.cc/maven
|
||||
Native coordinate:
|
||||
|
||||
```text
|
||||
cc.navsea.maplibre:android-sdk-particle-opengl:13.4.1-particle.21
|
||||
cc.navsea.maplibre:android-sdk-particle-opengl:13.6.1-particle.22
|
||||
```
|
||||
|
||||
Expo plugin 与 `android/build.gradle` 必须指向同一 `.21`。正常 Consumer 不复制 AAR、不依赖 MapLibreParticleLab 源码路径,也不以 Maven Local 作为公网验证主路径。完整 Linux 发布与 Win11 验证流程见 `docs/50_Step记录/STEP-080_Android_AAR与RNTestHost标准构建流水线_v2.md`。
|
||||
Expo plugin 与 `android/build.gradle` 必须指向同一 `.22`。正常 Consumer 不复制 AAR、不依赖 MapLibreParticleLab 源码路径,也不以 Maven Local 作为公网验证主路径。完整 Linux 发布与 Win11 验证流程见 `docs/50_Step记录/STEP-080_Android_AAR与RNTestHost标准构建流水线_v2.md`。
|
||||
|
||||
@@ -14,7 +14,7 @@ android {
|
||||
dependencies {
|
||||
implementation "com.facebook.react:react-android"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:2.1.20"
|
||||
implementation "cc.navsea.maplibre:android-sdk-particle-opengl:13.4.1-particle.21"
|
||||
implementation "cc.navsea.maplibre:android-sdk-particle-opengl:13.6.1-particle.22"
|
||||
compileOnly project(":maplibre_maplibre-react-native")
|
||||
testImplementation "junit:junit:4.13.2"
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ const iosTag = "navsea-maplibre-particle-rn-maplibre-spm";
|
||||
module.exports = function withNavSeaMapLibreParticle(config) {
|
||||
config = withProjectBuildGradle(config, (project) => {
|
||||
if (project.modResults.contents.includes(androidMarker)) return project;
|
||||
project.modResults.contents += `\n${androidMarker}\ngradle.projectsEvaluated {\n allprojects { p ->\n p.repositories.maven { repository -> repository.url = p.uri("https://pbf.jpcn.ccwu.cc/maven") }\n p.configurations.configureEach { configuration ->\n configuration.resolutionStrategy.dependencySubstitution {\n substitute module("org.maplibre.gl:android-sdk-opengl") using module("cc.navsea.maplibre:android-sdk-particle-opengl:13.4.1-particle.21")\n }\n }\n }\n}\nrootProject.ext.set("org.maplibre.reactnative.nativeVersion", "13.4.1")\nrootProject.ext.set("org.maplibre.reactnative.nativeVariant", "opengl")\n`;
|
||||
project.modResults.contents += `\n${androidMarker}\ngradle.projectsEvaluated {\n allprojects { p ->\n p.repositories.maven { repository -> repository.url = p.uri("https://pbf.jpcn.ccwu.cc/maven") }\n p.configurations.configureEach { configuration ->\n configuration.resolutionStrategy.dependencySubstitution {\n substitute module("org.maplibre.gl:android-sdk-opengl") using module("cc.navsea.maplibre:android-sdk-particle-opengl:13.6.1-particle.22")\n }\n }\n }\n}\nrootProject.ext.set("org.maplibre.reactnative.nativeVersion", "13.6.1")\nrootProject.ext.set("org.maplibre.reactnative.nativeVariant", "opengl")\n`;
|
||||
return project;
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navsea/maplibre-particle-rn",
|
||||
"version": "13.4.1-particle.21",
|
||||
"version": "13.6.1-particle.22",
|
||||
"description": "NavSea MapLibre Particle React Native pure Field Renderer API.",
|
||||
"license": "BSD-2-Clause",
|
||||
"main": "src/index.ts",
|
||||
@@ -29,7 +29,7 @@
|
||||
"url": "https://git.eyaku.jp/tei/MapLibreParticleLab"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@maplibre/maplibre-react-native": "11.3.6",
|
||||
"@maplibre/maplibre-react-native": "11.5.0",
|
||||
"expo": ">=54.0.0",
|
||||
"react": ">=19.1.0",
|
||||
"react-native": ">=0.80.0"
|
||||
@@ -53,6 +53,6 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@maplibre/maplibre-react-native": "11.3.6"
|
||||
"@maplibre/maplibre-react-native": "11.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
13.6.1
|
||||
13.6.1-particle.22
|
||||
|
||||
@@ -77,7 +77,7 @@ def main() -> None:
|
||||
"name": "@navsea/maplibre-particle-rn",
|
||||
"version": android_version,
|
||||
"artifact": tgz,
|
||||
"mapLibreReactNative": "11.3.6",
|
||||
"mapLibreReactNative": json.loads((ROOT / "packages/maplibre-particle-rn/package.json").read_text())["peerDependencies"]["@maplibre/maplibre-react-native"],
|
||||
},
|
||||
"android": {
|
||||
"version": android_version,
|
||||
|
||||
@@ -20,14 +20,20 @@ def base_version(value: str) -> str:
|
||||
return re.sub(r"-particle\.\d+$", "", value.strip())
|
||||
|
||||
|
||||
def replace_current_particle(path: Path, base: str, target: str) -> None:
|
||||
def replace_current_particle(path: Path, previous: str, target: str) -> None:
|
||||
text = path.read_text()
|
||||
pattern = rf"{re.escape(base)}-particle\.\d+"
|
||||
updated, count = re.subn(pattern, target, text)
|
||||
updated, count = re.subn(re.escape(previous), target, text)
|
||||
if count == 0:
|
||||
die(f"no particle version reference found in {path}")
|
||||
die(f"previous RN/Native version {previous} not found in {path}")
|
||||
path.write_text(updated)
|
||||
|
||||
|
||||
def replace_exact(path: Path, old: str, new: str) -> None:
|
||||
text = path.read_text()
|
||||
if text.count(old) != 1:
|
||||
die(f"expected exactly one version reference {old!r} in {path}")
|
||||
path.write_text(text.replace(old, new, 1))
|
||||
|
||||
def update_changelog(target: str, revision: int) -> None:
|
||||
path = RN_ROOT / "CHANGELOG.md"
|
||||
text = path.read_text()
|
||||
@@ -64,7 +70,11 @@ def main() -> None:
|
||||
|
||||
package_path = RN_ROOT / "package.json"
|
||||
package = json.loads(package_path.read_text())
|
||||
previous_rn_version = package["version"]
|
||||
package["version"] = android_version
|
||||
# v22 upgrades the host MapLibre React Native baseline together with native.
|
||||
package["peerDependencies"]["@maplibre/maplibre-react-native"] = "11.5.0"
|
||||
package["devDependencies"]["@maplibre/maplibre-react-native"] = "11.5.0"
|
||||
package_path.write_text(json.dumps(package, ensure_ascii=False, indent=2) + "\n")
|
||||
|
||||
for relative in (
|
||||
@@ -72,15 +82,14 @@ def main() -> None:
|
||||
"packages/maplibre-particle-rn/app.plugin.js",
|
||||
"integration/react-native/MapLibreParticleRNTestHost/plugins/withParticleNativeAndroid.js",
|
||||
):
|
||||
replace_current_particle(ROOT / relative, android_base, android_version)
|
||||
replace_current_particle(ROOT / relative, previous_rn_version, android_version)
|
||||
|
||||
readme = RN_ROOT / "README.md"
|
||||
readme_text = readme.read_text()
|
||||
readme_text = re.sub(
|
||||
rf"{re.escape(android_base)}-particle\.\d+",
|
||||
android_version,
|
||||
readme_text,
|
||||
)
|
||||
if previous_rn_version not in readme_text:
|
||||
die("README missing previous RN version")
|
||||
readme_text = readme_text.replace(previous_rn_version, android_version)
|
||||
readme_text = readme_text.replace("11.3.6", "11.5.0")
|
||||
readme_text = re.sub(
|
||||
r"必须指向同一 `\.\d+`",
|
||||
f"必须指向同一 `.{revision}`",
|
||||
@@ -88,6 +97,26 @@ def main() -> None:
|
||||
)
|
||||
readme.write_text(readme_text)
|
||||
|
||||
# Both Expo plugins must request the same upstream Native base as the new AAR.
|
||||
for relative in (
|
||||
"packages/maplibre-particle-rn/app.plugin.js",
|
||||
"integration/react-native/MapLibreParticleRNTestHost/plugins/withParticleNativeAndroid.js",
|
||||
):
|
||||
replace_exact(ROOT / relative,
|
||||
'nativeVersion", "13.4.1"',
|
||||
f'nativeVersion", "{android_base}"')
|
||||
|
||||
podspec = RN_ROOT / "MapLibreParticleRN.podspec"
|
||||
podtext = podspec.read_text()
|
||||
if podtext.count('11.3.6') != 2:
|
||||
die("podspec must contain exactly two pinned RN 11.3.6 references")
|
||||
podspec.write_text(podtext.replace("11.3.6", "11.5.0"))
|
||||
|
||||
host_path = ROOT / "integration/react-native/MapLibreParticleRNTestHost/package.json"
|
||||
host = json.loads(host_path.read_text())
|
||||
host["dependencies"]["@maplibre/maplibre-react-native"] = "11.5.0"
|
||||
host_path.write_text(json.dumps(host, ensure_ascii=False, indent=2) + "\n")
|
||||
|
||||
update_changelog(android_version, revision)
|
||||
|
||||
print(f"PARTICLE_REVISION={revision}")
|
||||
|
||||
@@ -73,6 +73,8 @@ prepare_release() {
|
||||
packages/maplibre-particle-rn/app.plugin.js \
|
||||
packages/maplibre-particle-rn/README.md \
|
||||
packages/maplibre-particle-rn/CHANGELOG.md \
|
||||
packages/maplibre-particle-rn/MapLibreParticleRN.podspec \
|
||||
integration/react-native/MapLibreParticleRNTestHost/package.json \
|
||||
integration/react-native/MapLibreParticleRNTestHost/plugins/withParticleNativeAndroid.js
|
||||
if ! git -C "$ROOT" diff --cached --quiet; then
|
||||
git -C "$ROOT" commit -m "release: prepare unified particle.$REV"
|
||||
|
||||
Reference in New Issue
Block a user