How to build for unlimited until-build - and make it stick

Answered

I have read many posts here, and tried to implement them, but nothing seems to work. When I build my plugin locally, everything seems fine. Once I release it to the marketplace, an until-build of ‘242.*’ is set (see https://plugins.jetbrains.com/plugin/18842-faktor-ips-development-tools/edit/versions/alpha/655088).

My build.gradle now looks like this:

import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
import org.jetbrains.intellij.platform.gradle.models.ProductRelease

plugins {
    id 'org.jetbrains.intellij.platform' version '2.2.0'
    id 'java'
}

group 'org.faktorips'

repositories {
    mavenCentral()

    intellijPlatform {
        defaultRepositories()
    }
}

dependencies {
    intellijPlatform {
        intellijIdeaCommunity("2022.3")

        bundledPlugin("com.intellij.java")

        pluginVerifier()
        zipSigner()
        instrumentationTools()
    }
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.0'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.0'
}

intellijPlatform {
    version = '25.1'
    buildSearchableOptions = false
    pluginConfiguration {
        ideaVersion {
            changeNotes = "Alpha Version"
            sinceBuild = "223"
            untilBuild = project.providers.<String>provider { null }
        }
    }
    pluginVerification {
        ides {
            select {
                it.types = [IntelliJPlatformType.IntellijIdeaCommunity]
                it.channels = [ProductRelease.Channel.RELEASE]
                it.sinceBuild = '223'
                it.untilBuild = project.providers.<String>provider { null }
            }
        }
    }
    patchPluginXml {
        untilBuild.set(project.providers.<String>provider { null })
    }
    signing {
        certificateChain = System.getenv('INTELLIJ_CERTIFICATE_CHAIN')!=null?new File(System.getenv('INTELLIJ_CERTIFICATE_CHAIN')).getText('UTF-8'):''
        privateKey = System.getenv('INTELLIJ_PRIVATE_KEY')!=null?new File(System.getenv('INTELLIJ_PRIVATE_KEY')).getText('UTF-8'):''
        password = System.getenv('INTELLIJ_PRIVATE_KEY_PASSWORD')?:''
    }
    publishing {
        token = System.getenv('INTELLIJ_PUBLISH_TOKEN')?:''
        channels = [System.getenv('INTELLIJ_CHANNEL')?:'Alpha']
    }
}
test {
    useJUnitPlatform()
}

The gradle.properties file only contains the line “version=25.1.0-SNAPSHOT” and the settings.gradle is “rootProject.name = 'faktorips'”

 

Do any of you see something I could improve?

0
1 comment

Hi,

Your plugin distribution contains the following part in plugin.xml:

<idea-version since-build="222" until-build="242.*" />

So the UI shows the proper value, and the same limitation should be visible locally.

I'm not sure about your untilBuild part:

untilBuild = project.providers.<String>provider { null }

In the Kotlin build script, it should be defined as:

untilBuild = provider { null }

I'm not familiar with the Groovy build script syntax (it is recommended to use kts) and I'm not sure whether these are the same.

0

Please sign in to leave a comment.