DEV Community

Query Filter
Query Filter

Posted on

gradle-64

// Set dynamic version with fallback to UNKNOWN-SNAPSHOT
if (project.hasProperty('appVersion') && project.property('appVersion')) {
    version = project.property('appVersion')
} else if (System.getenv('APP_VERSION')) {
    version = System.getenv('APP_VERSION')
} else if (version == 'unspecified' || !version) {
    version = 'UNKNOWN-SNAPSHOT'
}

// Explicitly set the base archive name for distributions
distributions {
    main {
        distributionBaseName = project.name
    }
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)