Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

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

Open
Aranda opened this issue May 22, 2017 · 1 comment
Open

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

Aranda opened this issue May 22, 2017 · 1 comment

Comments

@Aranda
Copy link

Aranda commented May 22, 2017

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
Copy link
Contributor

sbosley commented May 22, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants