@@ -83,6 +83,9 @@ def createDebugExtractionTask(config, linkTask) {
8383 description = ' Extract debug symbols from release library'
8484 workingDir project. buildDir
8585
86+ // Declare outputs so Gradle knows what files this task creates
87+ outputs. file getDebugFilePath(config)
88+
8689 doFirst {
8790 def sourceFile = linkTask. get(). linkedFile. get(). asFile
8891 def debugFile = getDebugFilePath(config)
@@ -127,7 +130,7 @@ def createDebugCopyTask(config, extractDebugTask) {
127130 }
128131 dependsOn extractDebugTask
129132 from file(" $buildDir /lib/main/${ config.name} /${ osIdentifier()} /${ archIdentifier()} /debug" )
130- into file(libraryTargetPath(config. name + ' -debug ' ))
133+ into file(libraryTargetPath(config. name))
131134 include ' **/*.debug'
132135 include ' **/*.dSYM/**'
133136 }
@@ -165,12 +168,6 @@ def setupDebugExtraction(config, linkTask) {
165168 // Create an extra folder for the debug symbols
166169 copyTask. dependsOn copyDebugTask
167170 }
168-
169- // Wire up the debug info JAR to depend on debug files being copied
170- def debugInfoJarTask = tasks. findByName(" debugInfoJar" )
171- if (debugInfoJarTask != null ) {
172- debugInfoJarTask. dependsOn copyDebugTask
173- }
174171 }
175172}
176173
@@ -258,19 +255,10 @@ tasks.register('copyExternalLibs', Copy) {
258255 from(project. getProperty(" with-libs" )) {
259256 include " **/*.so"
260257 include " **/*.dylib"
261- }
262- into " ${ projectDir} /build/classes/java/main/META-INF/native-libs"
263- }
264- }
265-
266- // Copy debug files from external libraries if they exist
267- tasks. register(' copyExternalDebugFiles' , Copy ) {
268- if (project. hasProperty(" with-libs" )) {
269- from(project. getProperty(" with-libs" )) {
270258 include " **/*.debug"
271259 include " **/*.dSYM/**"
272260 }
273- into libraryTargetBase( ' release-debug ' ) + " /META-INF/native-libs"
261+ into " ${ projectDir } /build/classes/java/main /META-INF/native-libs"
274262 }
275263}
276264
@@ -450,6 +438,7 @@ buildConfigNames().each { name ->
450438 if (! project. hasProperty(' skip-native' )) {
451439 dependsOn copyTask
452440 }
441+
453442 from sourceSets. main. output. classesDirs
454443 from files(libraryTargetBase(name)) {
455444 include " **/*"
@@ -615,19 +604,7 @@ tasks.register('javadocJar', Jar) {
615604 from javadoc. destinationDir
616605}
617606
618- tasks. register(' debugInfoJar' , Jar ) {
619- archiveBaseName = libraryName
620- archiveClassifier = ' debugInfo'
621- archiveVersion = component_version
622- from files(libraryTargetBase(' release-debug' )) {
623- include " **/*"
624- }
625607
626- // When using external libraries, depend on copyExternalDebugFiles
627- if (project. hasProperty(" with-libs" )) {
628- dependsOn copyExternalDebugFiles
629- }
630- }
631608
632609tasks. register(' scanBuild' , Exec ) {
633610 workingDir " ${ projectDir} /src/test/make"
@@ -698,7 +675,6 @@ publishing {
698675 }
699676 publication. artifact sourcesJar
700677 publication. artifact javadocJar
701- publication. artifact debugInfoJar
702678
703679 publication. groupId = ' com.datadoghq'
704680 publication. artifactId = ' ddprof'
0 commit comments