Files
MapLibreParticleLab/packages/maplibre-particle-rn/app.plugin.js
OpenAI Codex 5261f21c1a
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
release: configure particle Maven repository
2026-09-09 11:42:43 +08:00

13 lines
1.1 KiB
JavaScript

const { withProjectBuildGradle } = require("@expo/config-plugins");
const marker = "// @navsea/maplibre-particle-rn Android OpenGL release";
/** Resolves MLRN's single Native SDK request to the NavSea release artifact, never a second AAR. */
module.exports = function withNavSeaMapLibreParticle(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.1")\n }\n }\n }\n}\nrootProject.ext.set("org.maplibre.reactnative.nativeVersion", "13.4.1")\nrootProject.ext.set("org.maplibre.reactnative.nativeVariant", "opengl")\n`;
return project;
});
};