Skip to content

bug: Unable to customize compileSdkVersion with Gradle Kotlin DSL #5194

@saschpe

Description

@saschpe

Bug Report

Capacitor Version

3.1.5

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':capacitor-android:compileReleaseAidl'.
> Failed to find target with hash string '31' in: EXAMPLE

Screenshot 2021-11-02 at 09 44 31

Platform(s)

Android

Current Behavior

The default project template and capacitor-cordovan-android-plugins try to read rootProject.ext.compileSdkVersion as integer directly, which only works for Gradle Groovy projects. Projects using Gradle Kotlin DSL won't have access to the ext plugin. The new mechanism is to put properties into gradle.properties. Those however, are always strings.

Expected Behavior

compileSDK, minSdk and targetSdk can be customized in Gradle Kotlin DSL projects.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions