|
| 1 | +plugins { |
| 2 | + id("java-library") |
| 3 | + id("maven-publish") |
| 4 | + alias(libs.plugins.gradleNexusPublishPlugin) |
| 5 | + alias(libs.plugins.sonarqube) // SonarQube |
| 6 | +} |
| 7 | + |
| 8 | +group = "com.redhat.devtools.intellij" |
| 9 | +version = providers.gradleProperty("projectVersion").get() // Plugin version |
| 10 | + |
| 11 | +repositories { |
| 12 | + mavenLocal() |
| 13 | + mavenCentral() |
| 14 | + maven { |
| 15 | + url = uri("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies") |
| 16 | + } |
| 17 | +} |
| 18 | + |
| 19 | +dependencies { |
| 20 | + implementation(libs.kotlin.reflect) |
| 21 | + api(libs.junit.jupiter.api) |
| 22 | + api(libs.remote.robot) |
| 23 | + api(libs.remote.fixtures) |
| 24 | +} |
| 25 | + |
| 26 | + |
| 27 | +java { |
| 28 | + withSourcesJar() |
| 29 | + withJavadocJar() |
| 30 | +} |
| 31 | + |
| 32 | +tasks { |
| 33 | + wrapper { |
| 34 | + gradleVersion = providers.gradleProperty("gradleVersion").get() |
| 35 | + } |
| 36 | + |
| 37 | + test { |
| 38 | + useJUnitPlatform() |
| 39 | + } |
| 40 | + |
| 41 | + sonar { |
| 42 | + properties { |
| 43 | + property("sonar.projectKey", "redhat-developer_intellij-common-ui-test-library") |
| 44 | + property("sonar.organization", "redhat-developer") |
| 45 | + property("sonar.host.url", "https://sonarcloud.io") |
| 46 | + property("sonar.sources", "src") |
| 47 | + //property("sonar.gradle.skipCompile", "true") |
| 48 | + } |
| 49 | + } |
| 50 | + |
| 51 | +} |
| 52 | + |
| 53 | +publishing { |
| 54 | + publications { |
| 55 | + create<MavenPublication>("mavenJava") { |
| 56 | + from(components["java"]) |
| 57 | + artifact(tasks.named("sourcesJar")) |
| 58 | + artifact(tasks.named("javadocJar")) |
| 59 | + pom { |
| 60 | + name.set("IntelliJ common UI test library") |
| 61 | + description.set("Common utilities for IntelliJ UI testing") |
| 62 | + url.set("https://github.com/redhat-developer/intellij-common-ui-test-library") |
| 63 | + |
| 64 | + licenses { |
| 65 | + license { |
| 66 | + name.set("Eclipse Public License 2.0") |
| 67 | + url.set("https://www.eclipse.org/legal/epl-v20.html") |
| 68 | + } |
| 69 | + } |
| 70 | + developers { |
| 71 | + developer { |
| 72 | + name.set("Red Hat Developer") |
| 73 | + |
| 74 | + } |
| 75 | + } |
| 76 | + scm { |
| 77 | + connection.set("scm:git:git://github.com/redhat-developer/intellij-common-ui-test-library.git") |
| 78 | + developerConnection.set( "scm:git:ssh://[email protected]:redhat-developer/intellij-common-ui-test-library.git") |
| 79 | + url.set("https://github.com/redhat-developer/intellij-common-ui-test-library/") |
| 80 | + } |
| 81 | + } |
| 82 | + } |
| 83 | + } |
| 84 | +} |
| 85 | + |
| 86 | +nexusPublishing { |
| 87 | + packageGroup.set("JBoss Releases Staging Profile") |
| 88 | + repositories { |
| 89 | + create("jbossNexus") { |
| 90 | + nexusUrl.set(uri("https://repository.jboss.org/nexus/service/local/")) |
| 91 | + snapshotRepositoryUrl.set(uri("https://repository.jboss.org/nexus/content/repositories/snapshots/")) |
| 92 | + username.set(project.properties["nexusUser"].toString()) // defaults to project.properties["myNexusUsername"] |
| 93 | + password.set(project.properties["nexusPassword"].toString()) // defaults to project.properties["myNexusPassword"] |
| 94 | + } |
| 95 | + } |
| 96 | +} |
0 commit comments