Skip to content

Commit

Permalink
Merge branch 'main' into feat/docs-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
KiwiKilian committed Nov 15, 2024
2 parents 714f7f6 + ea1ac71 commit 36967a6
Show file tree
Hide file tree
Showing 124 changed files with 1,563 additions and 1,348 deletions.
67 changes: 51 additions & 16 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'com.android.library'

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

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

buildscript {
ext {
Expand All @@ -8,27 +16,54 @@ buildscript {
targetSdkVersion = 33
supportLibVersion = "28.0.0"
}

repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle'
}

android {
compileSdkVersion safeExtGet("compileSdkVersion", 33)
buildToolsVersion safeExtGet("buildToolsVersion", '33.0.1')

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 26)
versionCode 1
versionName "1.0"
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
}
}

allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven { url "https://jitpack.io" }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildTypes {
release {
minifyEnabled false
}
}
}

dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")

// MapLibre SDK
implementation "org.maplibre.gl:android-sdk:11.5.0"
implementation "org.maplibre.gl:android-sdk-turf:6.0.1"

// Dependencies
implementation "androidx.vectordrawable:vectordrawable:1.1.0"
implementation "androidx.annotation:annotation:1.7.0"
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "com.squareup.okhttp3:okhttp:${safeExtGet('okhttpVersion', '4.9.0')}"
implementation "com.squareup.okhttp3:okhttp-urlconnection:${safeExtGet('okhttpVersion', '4.9.0')}"

// MapLibre plugins
implementation ("org.maplibre.gl:android-plugin-localization-v9:3.0.1")
implementation ("org.maplibre.gl:android-plugin-annotation-v9:3.0.1")
implementation ("org.maplibre.gl:android-plugin-markerview-v9:3.0.1")
}
1 change: 0 additions & 1 deletion android/rctmln/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion android/rctmln/.npmignore

This file was deleted.

2 changes: 0 additions & 2 deletions android/rctmln/.settings/org.eclipse.buildship.core.prefs

This file was deleted.

64 changes: 0 additions & 64 deletions android/rctmln/build.gradle

This file was deleted.

25 changes: 0 additions & 25 deletions android/rctmln/proguard-rules.pro

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@babel/eslint-parser": "^7.22.9",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/runtime": "7.17.2",
"@expo/config-plugins": "^8.0.10",
"@expo/config-plugins": "^9.0.9",
"@maplibre/maplibre-gl-style-spec": "21.1.0",
"@react-native/babel-preset": "^0.74.88",
"@react-native/metro-config": "^0.74.88",
Expand All @@ -80,7 +80,7 @@
"ejs-lint": "^2.0.0",
"eslint": "^8.57.1",
"eslint-config-universe": "13.0.0",
"expo-module-scripts": "^3.1.0",
"expo-module-scripts": "^4.0.2",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"prettier": "3.3.3",
Expand Down
15 changes: 3 additions & 12 deletions packages/expo-app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { ExpoConfig, ConfigContext } from "expo/config";

export default ({ config }: ConfigContext): ExpoConfig => ({
...config,
name: "Expo",
name: "Expo App",
slug: "maplibre-react-native-expo-example",
version: "1.0.0",
newArchEnabled: true,
orientation: "portrait",
icon: "./assets/icon.png",
splash: {
Expand All @@ -27,15 +28,5 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
},
package: "org.maplibre.expo.example",
},
plugins: [
["expo-dev-launcher", { launchMode: "most-recent" }],
"@maplibre/maplibre-react-native",
[
"expo-build-properties",
{
ios: { newArchEnabled: true },
android: { newArchEnabled: true },
},
],
],
plugins: ["@maplibre/maplibre-react-native"],
});
17 changes: 8 additions & 9 deletions packages/expo-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@
"@maplibre-react-native/examples": "workspace:*",
"@maplibre/maplibre-react-native": "workspace:*",
"@react-native-masked-view/masked-view": "^0.3.1",
"expo": "^51.0.38",
"expo-build-properties": "^0.12.5",
"expo-dev-client": "^4.0.28",
"expo-status-bar": "^1.12.1",
"react": "18.2.0",
"react-native": "0.74.5",
"react-native-gesture-handler": "~2.16.1",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1"
"expo": "^52.0.0",
"expo-dev-client": "~5.0.1",
"expo-status-bar": "~2.0.0",
"react": "18.3.1",
"react-native": "0.76.1",
"react-native-gesture-handler": "~2.20.2",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.0.0"
},
"devDependencies": {
"@babel/core": "^7.25.8"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">React Native</string>
<string name="app_name">RN App</string>
</resources>
2 changes: 1 addition & 1 deletion packages/react-native-app/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autoli
rootProject.name = 'MapLibreReactNativeExample'

include ':rctmln'
project(':rctmln').projectDir = new File(rootProject.projectDir, '../../../android/rctmln')
project(':rctmln').projectDir = new File(rootProject.projectDir, '../../../android')
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
2 changes: 1 addition & 1 deletion packages/react-native-app/app.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "MapLibreReactNativeExample",
"displayName": "React Native"
"displayName": "RN App"
}
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
"FB_SONARKIT_ENABLED=0",
);
INFOPLIST_FILE = MapLibreReactNativeExample/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "React Native";
INFOPLIST_KEY_CFBundleDisplayName = "RN App";
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -319,7 +319,7 @@
CURRENT_PROJECT_VERSION = 1;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
INFOPLIST_FILE = MapLibreReactNativeExample/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "React Native";
INFOPLIST_KEY_CFBundleDisplayName = "RN App";
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>React Native</string>
<string>RN App</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand Down
10 changes: 0 additions & 10 deletions react-native.config.js

This file was deleted.

1 change: 0 additions & 1 deletion scripts/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const ANDROID_OUTPUT_PATH = path.join(
__dirname,
"..",
"android",
"rctmln",
"src",
"main",
"java",
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/getNativeVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let cachedIosVersion: string;
export const getAndroidVersion = async () => {
if (!cachedAndroidVersion) {
cachedAndroidVersion = await getNativeVersion(
["android", "rctmln", "build.gradle"],
["android", "build.gradle"],
/^\s+implementation\s+"org.maplibre.gl:android-sdk:(\d+\.\d+\.\d+)"$/,
);
}
Expand Down
Loading

0 comments on commit 36967a6

Please sign in to comment.