Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark as not compatible with configuration cache #433

Merged
merged 1 commit into from
Dec 13, 2023
Merged
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
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
Loading