mirror of
https://github.com/gradle/actions.git
synced 2025-04-21 18:29:18 +08:00
Set both old and new external application marker properties
This commit is contained in:
parent
5ebc5d3853
commit
e36e909388
@ -301,8 +301,11 @@ if (GradleVersion.current() < GradleVersion.version('6.0')) {
|
||||
|
||||
void applyPluginExternally(def pluginManager, String pluginClassName) {
|
||||
def externallyApplied = 'develocity.externally-applied'
|
||||
def externallyAppliedDeprecated = 'gradle.enterprise.externally-applied'
|
||||
def oldValue = System.getProperty(externallyApplied)
|
||||
def oldValueDeprecated = System.getProperty(externallyAppliedDeprecated)
|
||||
System.setProperty(externallyApplied, 'true')
|
||||
System.setProperty(externallyAppliedDeprecated, 'true')
|
||||
try {
|
||||
pluginManager.apply(initscript.classLoader.loadClass(pluginClassName))
|
||||
} finally {
|
||||
@ -311,6 +314,11 @@ void applyPluginExternally(def pluginManager, String pluginClassName) {
|
||||
} else {
|
||||
System.setProperty(externallyApplied, oldValue)
|
||||
}
|
||||
if (oldValueDeprecated == null) {
|
||||
System.clearProperty(externallyAppliedDeprecated)
|
||||
} else {
|
||||
System.setProperty(externallyAppliedDeprecated, oldValueDeprecated)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user