File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,11 @@ struct JExtractSwiftBuildToolPlugin: SwiftJavaPluginProtocol, BuildToolPlugin {
170170
171171 let swiftKitCoreClassPath = swiftJavaDirectory. appending ( path: " SwiftKitCore/build/classes/java/main " )
172172
173+ // We need to use a different gradle home, because
174+ // this plugin might be run from inside another gradle task
175+ // and that would cause conflicts.
176+ let gradleUserHome = context. pluginWorkDirectoryURL. appending ( path: " gradle-user-home " )
177+
173178 commands += [
174179 . buildCommand(
175180 displayName: " Build SwiftKitCore using Gradle (Java) " ,
@@ -180,7 +185,9 @@ struct JExtractSwiftBuildToolPlugin: SwiftJavaPluginProtocol, BuildToolPlugin {
180185 " --configure-on-demand " ,
181186 " --no-daemon "
182187 ] ,
183- environment: [ : ] ,
188+ environment: [
189+ " GRADLE_USER_HOME " : gradleUserHome. path ( percentEncoded: false )
190+ ] ,
184191 inputFiles: [ swiftJavaDirectory] ,
185192 outputFiles: [ swiftKitCoreClassPath]
186193 )
You can’t perform that action at this time.
0 commit comments