@@ -63,7 +63,7 @@ def getMissingToolErrorMessage(toolName, installInstructions) {
6363def createDebugExtractionTask (config , linkTask ) {
6464 return tasks. register(' extractDebugLibRelease' , Exec ) {
6565 onlyIf {
66- config . active && ! shouldSkipDebugExtraction()
66+ ! shouldSkipDebugExtraction()
6767 }
6868 dependsOn linkTask
6969 description = ' Extract debug symbols from release library'
@@ -109,7 +109,7 @@ def createDebugExtractionTask(config, linkTask) {
109109def createDebugLinkTask (config , linkTask , extractDebugTask ) {
110110 return tasks. register(' addDebugLinkLibRelease' , Exec ) {
111111 onlyIf {
112- config . active && os(). isLinux() && ! shouldSkipDebugExtraction()
112+ os(). isLinux() && ! shouldSkipDebugExtraction()
113113 }
114114 dependsOn extractDebugTask
115115 description = ' Add debug link to the original library'
@@ -148,16 +148,14 @@ def createDebugCopyTask(config, extractDebugTask) {
148148
149149// Main function to setup debug extraction for release builds
150150def setupDebugExtraction (config , linkTask ) {
151- if (config. name == ' release' ) {
151+ if (config. name == ' release' && config . active && ! project . hasProperty( ' skip-native ' ) ) {
152152 // Create all debug-related tasks
153153 def extractDebugTask = createDebugExtractionTask(config, linkTask)
154154 def addDebugLinkTask = createDebugLinkTask(config, linkTask, extractDebugTask)
155155
156156 // Create the strip task and configure it properly
157157 def stripTask = tasks. register(' stripLibRelease' , StripSymbols ) {
158- onlyIf {
159- config. active
160- }
158+ // No onlyIf needed here - setupDebugExtraction already handles the main conditions
161159 dependsOn addDebugLinkTask
162160 }
163161
@@ -176,6 +174,9 @@ def setupDebugExtraction(config, linkTask) {
176174 if (copyTask != null ) {
177175 copyTask. dependsOn stripTask
178176 copyTask. inputs. files stripTask. get(). outputs. files
177+
178+ // Create an extra folder for the debug symbols
179+ copyTask. dependsOn copyDebugTask
179180 }
180181 }
181182}
0 commit comments