Skip to content

Commit 52635e0

Browse files
author
Simone Gauli
committed
feat: make it build on android
1 parent ffaff42 commit 52635e0

12 files changed

Lines changed: 535 additions & 1522 deletions

File tree

.yarn/releases/yarn-4.11.0.cjs

Lines changed: 0 additions & 942 deletions
This file was deleted.

android/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ apply plugin: "com.android.library"
3535
apply plugin: "kotlin-android"
3636
apply from: '../nitrogen/generated/android/nitronotification+autolinking.gradle'
3737

38-
apply plugin: "com.facebook.react"
39-
4038
android {
4139
namespace "com.margelo.nitro.nitronotification"
4240

android/src/main/java/com/margelo/nitro/nitronotification/HybridNitroNotification.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,9 @@ class HybridNitroNotification : HybridNitroNotificationSpec() {
2626
override fun setOnTokenRefreshed(callback: ((token: String) -> Unit)?) = Unit
2727

2828
override fun setOnNotificationTapped(callback: ((response: NotificationResponse) -> Unit)?) = Unit
29+
30+
override fun setNotificationHandler(
31+
handler: ((notification: NotificationPayload) -> Promise<Promise<NotificationPresentationOptions>>)?,
32+
handlerTimeoutMs: Double?
33+
) = Unit
2934
}

example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ android {
102102
// see https://reactnative.dev/docs/signed-apk-android.
103103
signingConfig signingConfigs.debug
104104
minifyEnabled enableProguardInReleaseBuilds
105-
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
105+
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
106106
}
107107
}
108108
}

example/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
22
ext {
3-
buildToolsVersion = "36.0.0"
3+
buildToolsVersion = "37.0.0"
44
minSdkVersion = 24
5-
compileSdkVersion = 36
5+
compileSdkVersion = 37
66
targetSdkVersion = 36
77
ndkVersion = "27.1.12297006"
8-
kotlinVersion = "2.1.20"
8+
kotlinVersion = "2.2.0"
99
}
1010
repositories {
1111
google()

example/android/gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,8 @@ hermesEnabled=true
4242
# This allows your app to draw behind system bars for an immersive UI.
4343
# Note: Only works with ReactActivity and should not be used with custom Activity.
4444
edgeToEdgeEnabled=false
45+
46+
# Opt out of built-in kotlin and new DSL behavior that ships with AGP 9.
47+
# Starting from AGP 10.x these opt outs will be removed.
48+
android.builtInKotlin=false
49+
android.newDsl=false
2.73 KB
Binary file not shown.

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

example/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"@react-navigation/native": "^7.3.16",
2020
"@react-navigation/native-stack": "^7.18.8",
2121
"react": "19.2.3",
22-
"react-native": "0.86.2",
22+
"react-native": "0.87.0",
2323
"react-native-nitro-modules": "^0.36.5",
24-
"react-native-safe-area-context": "^5.9.0",
24+
"react-native-safe-area-context": "^5.9.1",
2525
"react-native-screens": "^4.27.0"
2626
},
2727
"devDependencies": {
@@ -31,10 +31,10 @@
3131
"@react-native-community/cli": "20.2.0",
3232
"@react-native-community/cli-platform-android": "20.2.0",
3333
"@react-native-community/cli-platform-ios": "20.2.0",
34-
"@react-native/babel-preset": "0.86.2",
35-
"@react-native/jest-preset": "0.86.2",
36-
"@react-native/metro-config": "0.86.2",
37-
"@react-native/typescript-config": "0.86.2",
34+
"@react-native/babel-preset": "0.87.0",
35+
"@react-native/jest-preset": "0.87.0",
36+
"@react-native/metro-config": "0.87.0",
37+
"@react-native/typescript-config": "0.87.0",
3838
"@types/react": "^19.2.18",
3939
"babel-plugin-react-compiler": "1.0.0",
4040
"execa": "^10.0.1",

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"scripts": {
5757
"build": "bob build",
5858
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
59+
"clear": "node tools/clear.ts",
5960
"example": "yarn workspace react-native-nitro-notification-example",
6061
"lint": "eslint \"**/*.{js,ts,tsx}\"",
6162
"nitrogen": "nitrogen",
@@ -68,9 +69,9 @@
6869
"@eslint/config-helpers": "^0.7.0",
6970
"@goatjs/dbz": "^2.64.0",
7071
"@goatjs/react-native-eslint": "^3.21.0",
71-
"@goatjs/rnx": "^1.28.0",
72+
"@goatjs/rimraf": "^2.12.0",
7273
"@goatjs/typescript-config": "^2.2.0",
73-
"@react-native/babel-preset": "0.86.2",
74+
"@react-native/babel-preset": "0.87.0",
7475
"@types/node": "^26.2.0",
7576
"@types/react": "^19.2.18",
7677
"babel-plugin-react-compiler": "1.0.0",
@@ -80,7 +81,7 @@
8081
"nitrogen": "^0.36.5",
8182
"prettier": "^3.9.6",
8283
"react": "19.2.3",
83-
"react-native": "0.86.2",
84+
"react-native": "0.87.0",
8485
"react-native-builder-bob": "^0.43.0",
8586
"react-native-nitro-modules": "^0.36.5",
8687
"turbo": "^2.10.10",

0 commit comments

Comments
 (0)