Sceneform-android-sdk: Sceneform Android Studio plugin adds Gradle plugin to wrong module

Created on 29 May 2018  路  4Comments  路  Source: google-ar/sceneform-android-sdk

I have a project with two modules:
app (An Android app module)
ar (An Android lib module)

Current behavior:
On every asset import the asset definition is added to the build.gradle of the lib project. The following gradle sync fails with the error that the Sceneform gradle plugin only supports app modules. I have to manually move the definition to the build.gradle of the app module.

Expected behavior:
The plugin adds asset definitions to the app module's build.gradle as it's the only one that supports the Sceneform gradle plugin.

bug fixed in upcoming release

All 4 comments

@StevenOttoG - Thanks for the report - we will get this fixed in an upcoming release.

Related problem: if multiple "application" modules are in a project, the one named "app"
will always get the gradle modifications even if the intention is to add the sceneForm
model to a different application module; would be great if the plugin checked where the
user has right-clicked in the project hierarchy to figure out which build.gradle needs modifying

@stevesamknows - Thanks! We have an internal fix to add the plugin and asset rule to the module associated with the model selected in the importer (i.e. the one you right-click on by default). This should take care of the problem you're seeing as well.

This is fixed in the 1.4.0 version of the Sceneform Android Studio plugin. Asset rules are now added to the project in which the asset files are located when they are imported.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rohitagarwal3011 picture rohitagarwal3011  路  4Comments

chiaolinghong3d picture chiaolinghong3d  路  3Comments

scolar picture scolar  路  4Comments

Brian-Kwon picture Brian-Kwon  路  3Comments

michaelvogt picture michaelvogt  路  4Comments