Skip to content

Commit cfb6f8d

Browse files
committed
update android folder
1 parent b12eee8 commit cfb6f8d

6 files changed

Lines changed: 70 additions & 97 deletions

File tree

android/build.gradle

Lines changed: 16 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,21 @@
11
buildscript {
2-
ext.getExtOrDefault = {name ->
3-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['Ama_' + name]
4-
}
5-
6-
repositories {
7-
google()
8-
mavenCentral()
9-
}
10-
11-
dependencies {
12-
classpath "com.android.tools.build:gradle:8.7.2"
13-
// noinspection DifferentKotlinGradleVersion
14-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
15-
}
16-
}
17-
18-
19-
apply plugin: "com.android.library"
20-
apply plugin: "kotlin-android"
21-
22-
apply plugin: "com.facebook.react"
23-
24-
def getExtOrIntegerDefault(name) {
25-
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["Ama_" + name]).toInteger()
26-
}
27-
28-
android {
29-
namespace "com.ama"
30-
31-
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
32-
33-
defaultConfig {
34-
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
35-
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
36-
}
37-
38-
buildFeatures {
39-
buildConfig true
40-
}
41-
42-
buildTypes {
43-
release {
44-
minifyEnabled false
2+
ext {
3+
buildToolsVersion = "35.0.0"
4+
minSdkVersion = 24
5+
compileSdkVersion = 35
6+
targetSdkVersion = 35
7+
ndkVersion = "27.1.12297006"
8+
kotlinVersion = "2.0.21"
459
}
46-
}
47-
48-
lintOptions {
49-
disable "GradleCompatible"
50-
}
51-
52-
compileOptions {
53-
sourceCompatibility JavaVersion.VERSION_1_8
54-
targetCompatibility JavaVersion.VERSION_1_8
55-
}
56-
57-
sourceSets {
58-
main {
59-
java.srcDirs += [
60-
"generated/java",
61-
"generated/jni"
62-
]
10+
repositories {
11+
google()
12+
mavenCentral()
13+
}
14+
dependencies {
15+
classpath("com.android.tools.build:gradle")
16+
classpath("com.facebook.react:react-native-gradle-plugin")
17+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
6318
}
64-
}
65-
}
66-
67-
repositories {
68-
mavenCentral()
69-
google()
70-
}
71-
72-
def kotlin_version = getExtOrDefault("kotlinVersion")
73-
74-
dependencies {
75-
implementation "com.facebook.react:react-android"
76-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
7719
}
7820

79-
react {
80-
jsRootDir = file("../src/")
81-
libraryName = "Ama"
82-
codegenJavaPackageName = "com.ama"
83-
}
21+
apply plugin: "com.facebook.react.rootproject"

android/gradle.properties

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
1-
Ama_kotlinVersion=2.0.21
2-
Ama_minSdkVersion=24
3-
Ama_targetSdkVersion=34
4-
Ama_compileSdkVersion=35
5-
Ama_ndkVersion=27.1.12297006
1+
# Project-wide Gradle settings.
2+
3+
# IDE (e.g. Android Studio) users:
4+
# Gradle settings configured through the IDE *will override*
5+
# any settings specified in this file.
6+
7+
# For more details on how to configure your build environment visit
8+
# http://www.gradle.org/docs/current/userguide/build_environment.html
9+
10+
# Specifies the JVM arguments used for the daemon process.
11+
# The setting is particularly useful for tweaking memory settings.
12+
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13+
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14+
15+
# When configured, Gradle will run in incubating parallel mode.
16+
# This option should only be used with decoupled projects. More details, visit
17+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18+
# org.gradle.parallel=true
19+
20+
# AndroidX package structure to make it clearer which packages are bundled with the
21+
# Android operating system, and which are packaged with your app's APK
22+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
23+
android.useAndroidX=true
24+
25+
# Use this property to specify which architecture you want to build.
26+
# You can also override it from the CLI using
27+
# ./gradlew <task> -PreactNativeArchitectures=x86_64
28+
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
29+
30+
# Use this property to enable support to the new architecture.
31+
# This will allow you to use TurboModules and the Fabric render in
32+
# your application. You should enable this flag either if you want
33+
# to write custom TurboModules/Fabric components OR use libraries that
34+
# are providing them.
35+
newArchEnabled=true
36+
37+
# Use this property to enable or disable the Hermes JS engine.
38+
# If set to false, you will be using JSC instead.
39+
hermesEnabled=true

android/src/debug/java/com/ama/AmaModule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.ama
1+
package com.reactnativeama
22

33
import com.facebook.react.bridge.ReactApplicationContext
44
import com.facebook.react.module.annotations.ReactModule

android/src/debug/java/com/ama/AmaPackage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.ama
1+
package com.reactnativeama
22

33
import com.facebook.react.BaseReactPackage
44
import com.facebook.react.bridge.NativeModule

examples/bare/package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
"dependencies": {
1313
"@react-navigation/native": "^6.1.7",
1414
"@react-navigation/native-stack": "^6.9.14",
15-
"react": "18.3.1",
16-
"react-native": "0.76.2",
15+
"@release-it/conventional-changelog": "^9.0.2",
16+
"react": "19.0.0",
17+
"react-native": "0.79.2",
1718
"react-native-gesture-handler": "^2.21.2",
1819
"react-native-reanimated": "^3.16.2",
1920
"react-native-safe-area-context": "^4.14.0",
@@ -24,13 +25,13 @@
2425
"@babel/core": "^7.25.2",
2526
"@babel/preset-env": "^7.25.3",
2627
"@babel/runtime": "^7.25.0",
27-
"@react-native-community/cli": "15.0.1",
28-
"@react-native-community/cli-platform-android": "15.0.1",
29-
"@react-native-community/cli-platform-ios": "15.0.1",
30-
"@react-native/babel-preset": "0.76.2",
31-
"@react-native/eslint-config": "0.76.2",
32-
"@react-native/metro-config": "0.76.2",
33-
"@react-native/typescript-config": "0.76.2",
28+
"@react-native-community/cli": "18.0.0",
29+
"@react-native-community/cli-platform-android": "18.0.0",
30+
"@react-native-community/cli-platform-ios": "18.0.0",
31+
"@react-native/babel-preset": "0.79.2",
32+
"@react-native/eslint-config": "0.79.2",
33+
"@react-native/metro-config": "0.79.2",
34+
"@react-native/typescript-config": "0.79.2",
3435
"@types/react": "^18.2.6",
3536
"@types/react-test-renderer": "^18.0.0",
3637
"babel-jest": "^29.6.3",

examples/expo/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
"@react-navigation/native-stack": "^6.9.14",
1515
"expo": "~51.0.39",
1616
"expo-status-bar": "~1.12.1",
17-
"react": "18.2.0",
18-
"react-native": "0.74.5",
17+
"react": "19.0.0",
18+
"react-native": "0.79.2",
1919
"react-native-gesture-handler": "~2.16.1",
2020
"react-native-reanimated": "~3.10.1",
2121
"react-native-safe-area-context": "4.10.5",
2222
"react-native-screens": "3.31.1"
2323
},
2424
"devDependencies": {
25-
"@babel/core": "^7.24.0",
25+
"@babel/core": "^7.25.2",
2626
"@types/react": "~18.2.45",
2727
"typescript": "~5.3.3"
2828
}

0 commit comments

Comments
 (0)