enonic / xp-gradle-plugin

Enonic XP Gradle Plugin.
Apache License 2.0
4 stars 2 forks source link

Correctly set XP version in jar file #4

Closed alansemenov closed 6 years ago

alansemenov commented 6 years ago

It seems that now minVersion and maxVersion are hardcoded to "6.0.0" and "7.0.0". We should set minVersion from ${xpVersion} in build.gradle file. We don't really need maxVersion.

sigdestad commented 6 years ago

Is this related to the jar file? I thought that what was listed in the UI simply never checked the jar file?

alansemenov commented 6 years ago

No, it's wrong in jar (and hardcoded in gradle plugin)

sigdestad commented 6 years ago

Ups.. But I thought installing new apps on old XP's would fail? Doesn't it?

alansemenov commented 6 years ago

Not sure - never tried it with XP < 6.0

sigdestad commented 6 years ago

An app that requires 6.12 should not be possible to install and run on 6.11

alansemenov commented 6 years ago

I guess you are talking about the list of Market apps in the Install dialog where we filter out apps based on the version. But version in the jar file is something different. We have min version and max version there and as of now they are hardcoded to 6.0 and 7.0.

aro commented 6 years ago

Fixed, pending review.

When using the new release of the plugin, the version needs to be added to build.gradle, using the systemVersion property:

app {
    name = 'com.enonic.app.myapp'
    displayName = 'My App'
    vendorName = 'Enonic AS'
    vendorUrl = 'http://enonic.com'
    systemVersion = "${xpVersion}"   <--
}

If it is missing the build fails and there is an error indicating were to set the missing property in build.gradle.

alansemenov commented 6 years ago

Released in version 1.0.15 of the gradle plugin