Realm-java: Support com.android.feature plugin

Created on 20 Jun 2017  路  11Comments  路  Source: realm/realm-java

Android Studio 3.0 introduced com.android.feature plugin. Because Realm explicitly checks for the existence of com.android.application or com.android.library plugins, applying realm-android in a feature causes an exception.

See the following line at Realm.groovy:

https://github.com/realm/realm-java/blob/7dbacb438f8f1130155eacf06347fce703c8f1a8/gradle-plugin/src/main/groovy/io/realm/gradle/Realm.groovy#L34

void apply(Project project) {
    // Make sure the project is either an Android application or library
    def isAndroidApp = project.plugins.withType(AppPlugin)
    def isAndroidLib = project.plugins.withType(LibraryPlugin)
    if (!isAndroidApp && !isAndroidLib) {
        throw new GradleException("'com.android.application' or 'com.android.library' plugin required.")
}
O-Community Pipeline-Idea-Backlog T-Feature

Most helpful comment

ABI splits are now supported: https://android-developers.googleblog.com/2017/10/introducing-android-instant-apps-sdk-11.html?m=1. We're happy to offer any support in using the feature.

All 11 comments

And we need to verify how does the NDK work with instant app~

And how to fit in the 4 MB APK size limit

Also according to this answer https://stackoverflow.com/questions/45878257/instant-app-and-splits-abi Instant Apps do not support ABI splits yet, which would also be a requirement to get below the 4MB limit.

ABI splits are now supported: https://android-developers.googleblog.com/2017/10/introducing-android-instant-apps-sdk-11.html?m=1. We're happy to offer any support in using the feature.

Beep boop any luck?

Has this been resolved, or at least being worked on? Wondering if I should just give up trying to integrate into my new instant app.

7 months later... any news about this issue?

the only way is with App Bundle, but i don't think that is compatible with Instant Apps?

Closing since Instant Apps have been deprecated in favor of App Bundle

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tloshi picture tloshi  路  3Comments

AlbertVilaCalvo picture AlbertVilaCalvo  路  3Comments

AAChartModel picture AAChartModel  路  3Comments

Merlin1993 picture Merlin1993  路  3Comments

nolanamy picture nolanamy  路  3Comments