Skip to content

Commit

Permalink
Merge pull request #433 from nebula-plugins/config-cache-compatibility
Browse files Browse the repository at this point in the history
Mark as not compatible with configuration cache
  • Loading branch information
rpalcolea authored Dec 13, 2023
2 parents 7d966be + 4164147 commit 7d8e3b8
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ import org.gradle.work.DisableCachingByDefault
@DisableCachingByDefault
class DaemonTemplateTask extends ConventionTask {

DaemonTemplateTask() {
notCompatibleWithConfigurationCache("nebula.ospackage does not support configuration cache")
}

@Internal
Map<String, String> context

Expand Down
1 change: 1 addition & 0 deletions src/main/groovy/com/netflix/gradle/plugins/deb/Deb.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Deb extends SystemPackagingTask {
Deb() {
super()
archiveExtension.set 'deb'
notCompatibleWithConfigurationCache("nebula.ospackage does not support configuration cache")
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ import javax.annotation.Nullable
@DisableCachingByDefault
abstract class OsPackageAbstractArchiveTask extends AbstractArchiveTask {

OsPackageAbstractArchiveTask() {
super()
notCompatibleWithConfigurationCache("nebula.ospackage does not support configuration cache")
}

void setVersion(@Nullable String version) {
archiveVersion.convention(version)
archiveVersion.set(version)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ abstract class SystemPackagingTask extends OsPackageAbstractArchiveTask {
}

configureDuplicateStrategy()
notCompatibleWithConfigurationCache("nebula.ospackage does not support configuration cache")
}

private void configureDuplicateStrategy() {
Expand Down
1 change: 1 addition & 0 deletions src/main/groovy/com/netflix/gradle/plugins/rpm/Rpm.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Rpm extends SystemPackagingTask {
Rpm() {
super()
archiveExtension.set 'rpm'
notCompatibleWithConfigurationCache("nebula.ospackage does not support configuration cache")
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ import nebula.test.IntegrationTestKitSpec

abstract class BaseIntegrationTestKitSpec extends IntegrationTestKitSpec {
def setup() {
// Enable configuration cache :)
new File(projectDir, 'gradle.properties') << '''org.gradle.configuration-cache=true'''.stripIndent()
}

void disableConfigurationCache() {
def propertiesFile = new File(projectDir, 'gradle.properties')
if(propertiesFile.exists()) {
propertiesFile.delete()
}
propertiesFile.createNewFile()
propertiesFile << '''org.gradle.configuration-cache=false'''.stripIndent()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class OspackageApplicationSpringBootPluginLauncherSpec extends BaseIntegrationTe
@Rule
public final ProvideSystemProperty ignoreDeprecations = new ProvideSystemProperty("ignoreDeprecations", "true")

def setup() {
disableConfigurationCache() // org.gradle.api.tasks.application.CreateStartScript does not support config cache and it is used in Spring Boot plugin in these tests
}

def 'plugin throws exception if spring-boot plugin not applied'() {
buildFile << """
plugins {
Expand Down

0 comments on commit 7d8e3b8

Please sign in to comment.