@trainstar/synchro-react-native 0.4.0-rc.2 → 0.4.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,131 @@
1
+ diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
2
+ --- a/gradle/libs.versions.toml
3
+ +++ b/gradle/libs.versions.toml
4
+ @@ -7 +7 @@
5
+ -kotlin = "2.1.20"
6
+ +kotlin = "2.4.21"
7
+ diff --git a/react-native-gradle-plugin/build.gradle.kts b/react-native-gradle-plugin/build.gradle.kts
8
+ --- a/react-native-gradle-plugin/build.gradle.kts
9
+ +++ b/react-native-gradle-plugin/build.gradle.kts
10
+ @@ -67 +67 @@
11
+ - apiVersion.set(KotlinVersion.KOTLIN_1_8)
12
+ + apiVersion.set(KotlinVersion.KOTLIN_2_4)
13
+ diff --git a/settings-plugin/build.gradle.kts b/settings-plugin/build.gradle.kts
14
+ --- a/settings-plugin/build.gradle.kts
15
+ +++ b/settings-plugin/build.gradle.kts
16
+ @@ -57 +57 @@
17
+ - apiVersion.set(KotlinVersion.KOTLIN_1_8)
18
+ + apiVersion.set(KotlinVersion.KOTLIN_2_4)
19
+ diff --git a/shared-testutil/build.gradle.kts b/shared-testutil/build.gradle.kts
20
+ --- a/shared-testutil/build.gradle.kts
21
+ +++ b/shared-testutil/build.gradle.kts
22
+ @@ -30 +30 @@
23
+ - apiVersion.set(KotlinVersion.KOTLIN_1_8)
24
+ + apiVersion.set(KotlinVersion.KOTLIN_2_4)
25
+ diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts
26
+ --- a/shared/build.gradle.kts
27
+ +++ b/shared/build.gradle.kts
28
+ @@ -36 +36 @@
29
+ - apiVersion.set(KotlinVersion.KOTLIN_1_8)
30
+ + apiVersion.set(KotlinVersion.KOTLIN_2_4)
31
+ diff --git a/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt b/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt
32
+ --- a/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt
33
+ +++ b/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt
34
+ @@ -100,6 +100,17 @@
35
+ - // Library Only Configuration
36
+ - configureBuildConfigFieldsForLibraries(project)
37
+ - configureNamespaceForLibraries(project)
38
+ - project.pluginManager.withPlugin("com.android.library") {
39
+ - configureCodegen(project, extension, rootExtension, isLibrary = true)
40
+ - }
41
+ + project.pluginManager.withPlugin("com.android.application") {
42
+ + project.rootProject.allprojects { subproject ->
43
+ + subproject.pluginManager.withPlugin("com.android.library") {
44
+ + if (!subproject.state.executed) {
45
+ + configureBuildConfigFieldsForLibraries(subproject)
46
+ + configureNamespaceForLibraries(subproject)
47
+ + }
48
+ + }
49
+ + }
50
+ + }
51
+ +
52
+ + // Library Only Configuration
53
+ + project.pluginManager.withPlugin("com.android.library") {
54
+ + configureBuildConfigFieldsForLibraries(project)
55
+ + configureNamespaceForLibraries(project)
56
+ + configureCodegen(project, extension, rootExtension, isLibrary = true)
57
+ + }
58
+ diff --git a/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt b/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt
59
+ --- a/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt
60
+ +++ b/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt
61
+ @@ -84,9 +83,9 @@
62
+ - fun configureBuildConfigFieldsForLibraries(appProject: Project) {
63
+ - appProject.rootProject.allprojects { subproject ->
64
+ - subproject.pluginManager.withPlugin("com.android.library") {
65
+ - subproject.extensions
66
+ - .getByType(LibraryAndroidComponentsExtension::class.java)
67
+ - .finalizeDsl { ext -> ext.buildFeatures.buildConfig = true }
68
+ - }
69
+ - }
70
+ - }
71
+ + fun configureBuildConfigFieldsForLibraries(project: Project) {
72
+ + if (project.extensions.extraProperties.has(BUILD_CONFIG_FIELDS_CONFIGURED_PROPERTY)) {
73
+ + return
74
+ + }
75
+ + project.extensions.extraProperties.set(BUILD_CONFIG_FIELDS_CONFIGURED_PROPERTY, true)
76
+ + project.extensions
77
+ + .getByType(LibraryAndroidComponentsExtension::class.java)
78
+ + .finalizeDsl { ext -> ext.buildFeatures.buildConfig = true }
79
+ + }
80
+ @@ -116,22 +116,22 @@
81
+ - fun configureNamespaceForLibraries(appProject: Project) {
82
+ - appProject.rootProject.allprojects { subproject ->
83
+ - subproject.pluginManager.withPlugin("com.android.library") {
84
+ - subproject.extensions
85
+ - .getByType(LibraryAndroidComponentsExtension::class.java)
86
+ - .finalizeDsl { ext ->
87
+ - if (ext.namespace == null) {
88
+ - val android = subproject.extensions.getByType(LibraryExtension::class.java)
89
+ - val manifestFile = android.sourceSets.getByName("main").manifest.srcFile
90
+ -
91
+ - manifestFile
92
+ - .takeIf { it.exists() }
93
+ - ?.let { file ->
94
+ - getPackageNameFromManifest(file)?.let { packageName ->
95
+ - ext.namespace = packageName
96
+ - }
97
+ - }
98
+ - }
99
+ - }
100
+ - }
101
+ - }
102
+ - }
103
+ + fun configureNamespaceForLibraries(project: Project) {
104
+ + if (project.extensions.extraProperties.has(NAMESPACE_CONFIGURED_PROPERTY)) {
105
+ + return
106
+ + }
107
+ + project.extensions.extraProperties.set(NAMESPACE_CONFIGURED_PROPERTY, true)
108
+ + project.extensions
109
+ + .getByType(LibraryAndroidComponentsExtension::class.java)
110
+ + .finalizeDsl { ext ->
111
+ + if (ext.namespace == null) {
112
+ + val android = project.extensions.getByType(LibraryExtension::class.java)
113
+ + val manifestFile = android.sourceSets.getByName("main").manifest.srcFile
114
+ +
115
+ + manifestFile
116
+ + .takeIf { it.exists() }
117
+ + ?.let { file ->
118
+ + getPackageNameFromManifest(file)?.let { packageName ->
119
+ + ext.namespace = packageName
120
+ + }
121
+ + }
122
+ + }
123
+ + }
124
+ + }
125
+ @@ -139 +139,5 @@
126
+ -
127
+ +
128
+ +private const val BUILD_CONFIG_FIELDS_CONFIGURED_PROPERTY =
129
+ + "com.facebook.react.internal.buildConfigFieldsConfigured"
130
+ +private const val NAMESPACE_CONFIGURED_PROPERTY = "com.facebook.react.internal.namespaceConfigured"
131
+ +
@@ -0,0 +1,30 @@
1
+ diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
2
+ --- a/gradle/libs.versions.toml
3
+ +++ b/gradle/libs.versions.toml
4
+ @@ -7 +7 @@
5
+ -kotlin = "2.2.0"
6
+ +kotlin = "2.4.21"
7
+ diff --git a/react-native-gradle-plugin/build.gradle.kts b/react-native-gradle-plugin/build.gradle.kts
8
+ --- a/react-native-gradle-plugin/build.gradle.kts
9
+ +++ b/react-native-gradle-plugin/build.gradle.kts
10
+ @@ -67 +67 @@
11
+ - apiVersion.set(KotlinVersion.KOTLIN_2_0)
12
+ + apiVersion.set(KotlinVersion.KOTLIN_2_4)
13
+ diff --git a/settings-plugin/build.gradle.kts b/settings-plugin/build.gradle.kts
14
+ --- a/settings-plugin/build.gradle.kts
15
+ +++ b/settings-plugin/build.gradle.kts
16
+ @@ -57 +57 @@
17
+ - apiVersion.set(KotlinVersion.KOTLIN_2_0)
18
+ + apiVersion.set(KotlinVersion.KOTLIN_2_4)
19
+ diff --git a/shared-testutil/build.gradle.kts b/shared-testutil/build.gradle.kts
20
+ --- a/shared-testutil/build.gradle.kts
21
+ +++ b/shared-testutil/build.gradle.kts
22
+ @@ -30 +30 @@
23
+ - apiVersion.set(KotlinVersion.KOTLIN_2_0)
24
+ + apiVersion.set(KotlinVersion.KOTLIN_2_4)
25
+ diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts
26
+ --- a/shared/build.gradle.kts
27
+ +++ b/shared/build.gradle.kts
28
+ @@ -36 +36 @@
29
+ - apiVersion.set(KotlinVersion.KOTLIN_2_0)
30
+ + apiVersion.set(KotlinVersion.KOTLIN_2_4)