Skip to content

Commit

Permalink
Fix Nimbus gradle plugin issues (#5421)
Browse files Browse the repository at this point in the history
* adjust java generating task reference and how the app finds tasks that depend on nimbus
* update changelog
  • Loading branch information
jeddai authored Mar 8, 2023
1 parent dc1826a commit 3c6e27c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 4 additions & 1 deletion CHANGES_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ Use the template below to make assigning a version number during the release cut

## Nimbus ⛅️🔬🔭

### 🦊 What's Changed 🦊
- Fix Nimbus gradle plugin source file and task dependency issues ([#5421](/~https://github.com/mozilla/application-services/pull/5421))

### ✨ What's New ✨
- Added new testing tooling `HardcodeNimbusFeatures` to aid UI and integration tests ([#5393](/~https://github.com/mozilla/application-services/pull/5393).
- Added new testing tooling `HardcodeNimbusFeatures` to aid UI and integration tests ([#5393](/~https://github.com/mozilla/application-services/pull/5393))
Original file line number Diff line number Diff line change
Expand Up @@ -363,17 +363,19 @@ class NimbusPlugin implements Plugin<Project> {
println args
}

if(variant.hasProperty('registerJavaGeneratingTask')) {
if(variant.metaClass.respondsTo(variant, 'registerJavaGeneratingTask', Task, File)) {
variant.registerJavaGeneratingTask(generateTask, new File(outputDir))
}

def generateSourcesTask = project.tasks.findByName("generate${variant.name.capitalize()}Sources")
if (generateSourcesTask != null) {
generateSourcesTask.dependsOn(generateTask)
} else {
project.tasks.findAll().stream().filter({ task ->
task.name.startsWith("compile")
}).forEach({ task ->
project.tasks.findAll().stream()
.filter({ task ->
return task.name.contains("compile")
})
.forEach({ task ->
task.dependsOn(generateTask)
})
}
Expand Down

0 comments on commit 3c6e27c

Please sign in to comment.