yahoo / squidb

SquiDB is a SQLite database library for Android and iOS
https://github.com/yahoo/squidb/wiki
Apache License 2.0
1.31k stars 132 forks source link

Android gradle plugin 3.0.0-alpha1 fails in squidb-android #277

Open Aranda opened 7 years ago

Aranda commented 7 years ago

When processing squidb-android/build.gradle using the new gradle plugin, we get Gradle sync failed: Not valid. on this block:

    libraryVariants.all { variant ->
        variant.outputs.each { output ->
            // THIS LINE FAILS
            def outputFile = output.outputFile
            if (outputFile != null && outputFile.name.endsWith('.aar')) {
                def fileName = "${archivesBaseName}-${version}.aar"
                output.outputFile = new File(outputFile.parent, fileName)
            }
        }
    }

Looks like using outputFile is not supported: https://developer.android.com/studio/preview/features/new-android-plugin-migration.html#variant_api

For our purposes (cross platform compilation), can I safely remove this block? Doing so seems to compile.

sbosley commented 7 years ago

Yes, if you're just building squidb from source directly in your project, removing this block should be no problem. Its purpose is just to make sure that the artifacts we build for publishing to jcenter are named correctly. Thanks for the heads up that its not working in the new plugin version! We probably won't adopt the new plugin ourselves until it's hit a more stable release, but we'll have to fix it sooner or later.