Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/crisp-animals-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'brownfield': patch
'@callstack/react-native-brownfield': patch
---

fix: support custom app project name in Gradle plugin via extension's appProjectName config field
7 changes: 7 additions & 0 deletions .changeset/seven-tables-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@callstack/react-native-brownfield': patch
'brownfield': patch
'@callstack/brownfield-cli': patch
---

chore: bump up Gradle plugin version
2 changes: 1 addition & 1 deletion apps/RNApp/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
classpath("com.callstack.react:brownfield-gradle-plugin:1.0.1-SNAPSHOT")
classpath("com.callstack.react:brownfield-gradle-plugin:1.0.2-SNAPSHOT")
}
}

Expand Down
2 changes: 1 addition & 1 deletion apps/scripts/prepare-android-build-gradle-for-ci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (!projectDirName) {

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const SNAPSHOT_VERSION = '1.0.1-SNAPSHOT';
const SNAPSHOT_VERSION = '1.0.2-SNAPSHOT';
const targetPath = path.resolve(
__dirname,
'..',
Expand Down
4 changes: 2 additions & 2 deletions gradle-plugins/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ buildscript {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
+ classpath("com.callstack.react:brownfield-gradle-plugin:1.0.1")
+ classpath("com.callstack.react:brownfield-gradle-plugin:1.0.2")
}
}
```
Expand Down Expand Up @@ -59,7 +59,7 @@ buildscript {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
+ classpath("com.callstack.react:brownfield-gradle-plugin:1.0.1-SNAPSHOT")
+ classpath("com.callstack.react:brownfield-gradle-plugin:1.0.2-SNAPSHOT")
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion gradle-plugins/react/brownfield/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PROJECT_ID=com.callstack.react.brownfield
ARTIFACT_ID=brownfield-gradle-plugin
VERSION=1.0.1
VERSION=1.0.2
GROUP=com.callstack.react
IMPLEMENTATION_CLASS=com.callstack.react.brownfield.plugin.RNBrownfieldPlugin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ class RNBrownfieldPlugin
project.evaluationDependsOn(EXPO_PROJECT_LOCATOR)
}

RNSourceSets.configure(project, extension)
projectConfigurations.setup()
registerRClassTransformer()

project.afterEvaluate {
RNSourceSets.configure(project, extension)
afterEvaluate()

if (this.isExpoProject) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* We can't use the new `com.android.build.gradle.api.LibraryVariant`
* as of now.
*
* We may want to re-visit this in future.
* We may want to re-visit this in the future.
*/

package com.callstack.react.brownfield.processors
Expand All @@ -17,6 +17,7 @@ import com.callstack.react.brownfield.artifacts.ArtifactsResolver.Companion.ARTI
import com.callstack.react.brownfield.exceptions.TaskNotFound
import com.callstack.react.brownfield.shared.BaseProject
import com.callstack.react.brownfield.utils.AndroidArchiveLibrary
import com.callstack.react.brownfield.utils.Extension
import com.callstack.react.brownfield.utils.capitalized
import org.gradle.api.Task
import org.gradle.api.artifacts.ResolvedArtifact
Expand Down Expand Up @@ -57,7 +58,9 @@ class VariantProcessor(private val variant: LibraryVariant) : BaseProject() {
}

if (capitalizedVariantName.contains("Release")) {
prepareTask.dependsOn(":app:createBundle${capitalizedVariantName}JsAndAssets")
val projectExt = project.extensions.getByType(Extension::class.java)
val appProject = project.rootProject.project(projectExt.appProjectName)
prepareTask.dependsOn("${appProject.path}:createBundle${capitalizedVariantName}JsAndAssets")
}

val bundleTask = variantTaskProvider.bundleTaskProvider(project, variant.name)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const BROWNFIELD_PLUGIN_VERSION = '1.0.1';
export const BROWNFIELD_PLUGIN_VERSION = '1.0.2';
export const brownfieldGradlePluginDependency = `classpath("com.callstack.react:brownfield-gradle-plugin:${BROWNFIELD_PLUGIN_VERSION}")`;
Loading