Skip to content

Commit f42fcd2

Browse files
committed
Don't assemble Realm when uploading binaries.
1 parent 45459a2 commit f42fcd2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ task assemble {
291291

292292
task distributionJniUnstrippedPackage(type:Zip) {
293293
description = 'Generate native libs package with debug symbols'
294-
dependsOn assembleRealm
295294

296295
group = 'Artifact'
297296
archiveName = "realm-java-jni-libs-unstripped-${currentVersion}.zip"
@@ -300,6 +299,15 @@ task distributionJniUnstrippedPackage(type:Zip) {
300299
from("realm/realm-library/build/outputs/jniLibs-unstripped") {
301300
include '**/*.so'
302301
}
302+
doLast {
303+
// Failsafe check, ensuring that we catch if the path ever changes, which it might since it is an
304+
// implementation detail of the Android Gradle Plugin
305+
def unstrippedDir = file("${rootDir}/realm/realm-library/build/outputs/jniLibs-unstripped")
306+
print(unstrippedDir)
307+
if (!unstrippedDir.exists() || !unstrippedDir.isDirectory() || unstrippedDir.listFiles().size() == 0) {
308+
throw new GradleException("Could not locate unstripped binary files in: ${unstrippedDir.getPath()}")
309+
}
310+
}
303311
}
304312

305313
task cleanRealm(type:GradleBuild) {

0 commit comments

Comments
 (0)