// Copyright (C) 2024 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 plugins { id 'groovy' id 'java-gradle-plugin' id 'maven-publish' id 'signing' id 'com.gradleup.nmcp' version '0.0.8' } group = 'org.qtproject.qt.gradleplugin' // keep version in sync with doc/config/qtgradleplugin-project.qdocconf version = '1.3' repositories { mavenCentral() } dependencies { testImplementation libs.spock.core testImplementation 'org.junit.jupiter:junit-jupiter' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } gradlePlugin { plugins { qtplugin { id = group implementationClass = 'org.qtproject.qt.gradleplugin.QtGradlePlugin' } } } tasks.named('test', Test) { useJUnitPlatform() testLogging { showStandardStreams = true events = ["passed", "failed", "skipped"] } } tasks.named('jar', Jar) { manifest { attributes( "Implementation-Version": version, "Implementation-Title": "Qt Gradle Plugin", "Implementation-Vendor": "Qt Group" ) } } afterEvaluate { publishing { publications { it.withType(MavenPublication).configureEach { groupId = it.groupId artifactId = it.artifactId version = it.version pom { name = 'Qt Gradle Plugin' description = 'A plugin for building, dependency linking and packaging of Qt for Android sub-projects' url = 'https://code.qt.io/cgit/qt-labs/qtgradleplugin.git' licenses { license { name = 'Apache-2.0' url = 'http://www.apache.org/licenses/LICENSE-2.0' } license { name = 'GPL-3.0-only' url = 'https://www.gnu.org/licenses/' } license { name = 'LicenseRef-Qt-Commercial' url = 'https://www.qt.io/terms-conditions' } } developers { developer { organization = 'Qt Group' url = 'https://www.qt.io/' email = 'qt.android@qt.io' } } scm { connection = 'scm:git:git://code.qt.io/qt-labs/qtgradleplugin.git' developerConnection = 'scm:git:https://codereview.qt-project.org/qt-labs/qtgradleplugin' url = 'https://code.qt.io/cgit/qt-labs/qtgradleplugin.git' } } } } repositories { maven { url = project.publishingUrl credentials { username = project.publishingUser password = project.publishingPass } } } } } java { withSourcesJar() withJavadocJar() } signing { required = gradle.taskGraph.hasTask("publish") sign publishing.publications } nmcp { publishAllProjectsProbablyBreakingProjectIsolation { username = project.publishingUser password = project.publishingPass // USER_MANAGED publish manually from the portal (recommended) // AUTOMATIC publish automatically (alternative) publicationType = "USER_MANAGED" } }