Skip to content

Commit 726447d

Browse files
fix android linking issue
1 parent 8a63f1c commit 726447d

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,16 @@ cd example
291291
npm run ios # or npm run android
292292
```
293293

294+
### Version Management
295+
296+
The package uses synchronized versioning across all platforms:
297+
298+
- **npm package**: Version defined in `package.json`
299+
- **iOS podspec**: Automatically reads from `package.json` via `package['version']`
300+
- **Android gradle**: Automatically reads from `package.json` via `getPackageJsonVersion()`
301+
302+
To update the version, only change `package.json` - all other platforms will sync automatically.
303+
294304
### Code Standards
295305

296306
- Full TypeScript support with strict mode

android/build.gradle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ apply plugin: 'kotlin-android'
33
apply plugin: 'maven-publish'
44

55
group = 'expo.modules.streamer'
6-
version = '1.0.0'
6+
7+
// Read version from package.json to keep it in sync
8+
def getPackageJsonVersion() {
9+
def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text)
10+
return packageJson.version
11+
}
12+
version = getPackageJsonVersion()
713

814
buildscript {
915
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -68,7 +74,7 @@ android {
6874
minSdkVersion = safeExtGet("minSdkVersion", 23)
6975
targetSdkVersion = safeExtGet("targetSdkVersion", 34)
7076
versionCode = 1
71-
versionName = "1.0.0"
77+
versionName = getPackageJsonVersion()
7278
}
7379
lintOptions {
7480
abortOnError = false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "expo-streamer",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "Realtime Audio Streaming for Expo",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

0 commit comments

Comments
 (0)