-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy dSYM to DWARF_DSYM_FOLDER_PATH when archiving the app
^KT-71423
- Loading branch information
1 parent
6b28b52
commit 332753b
Showing
9 changed files
with
285 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/apple/CopyDsymDuringArchiving.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. | ||
*/ | ||
|
||
package org.jetbrains.kotlin.gradle.plugin.mpp.apple | ||
|
||
import org.gradle.api.DefaultTask | ||
import org.gradle.api.file.FileSystemOperations | ||
import org.gradle.api.provider.Property | ||
import org.gradle.api.tasks.Input | ||
import org.gradle.api.tasks.Internal | ||
import org.gradle.api.tasks.Optional | ||
import org.gradle.api.tasks.TaskAction | ||
import org.gradle.work.DisableCachingByDefault | ||
import java.io.File | ||
import javax.inject.Inject | ||
|
||
@DisableCachingByDefault(because = "This task only does copying") | ||
internal abstract class CopyDsymDuringArchiving @Inject constructor( | ||
private val fsOperations: FileSystemOperations, | ||
) : DefaultTask() { | ||
|
||
@get:Internal | ||
abstract val dsymPath: Property<File> | ||
|
||
@get:Optional | ||
@get:Input | ||
abstract val dwarfDsymFolderPath: Property<String> | ||
|
||
@TaskAction | ||
fun copy() { | ||
val dwarfDsymFolderPath = this.dwarfDsymFolderPath.orNull ?: return | ||
if (dwarfDsymFolderPath.isEmpty()) return | ||
fsOperations.copy { | ||
it.from(dsymPath.get()) { innerSpec -> | ||
innerSpec.into(dsymPath.get().name) | ||
} | ||
it.into(dwarfDsymFolderPath) | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.