Skip to content

Commit

Permalink
🧱 Apply workaround for gradle publications issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Jul 3, 2024
1 parent 266acac commit 18aa0d7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 31 deletions.
34 changes: 33 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,39 @@ jobs:
- name: Run linters and test
run: ./gradlew clean :plugin:build :plugin:publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_TOKEN }} -PbuildNumber=${{ env.PATCH_VERSION }}
- name: Publish JAR to Space
run: ./gradlew :common:publish
run: |
cat <<EOF >> common/build.gradle.kts
publishing {
publications {
create<MavenPublication>("common") {
groupId = group.toString()
artifactId = "cli"
version = version.toString()
from(components["java"])
artifact(tasks["jarSources"])
pom {
url.set("https://github.com/JetBrains/qodana-action")
licenses {
license {
name.set("Apache-2.0")
url.set("https://github.com/JetBrains/qodana-action/blob/main/LICENSE")
}
}
}
}
}
repositories {
maven {
url = uri("https://packages.jetbrains.team/maven/p/sa/maven-public")
credentials {
username = System.getenv("JB_SPACE_INTELLIJ_CLIENT_ID")
password = System.getenv("JB_SPACE_INTELLIJ_CLIENT_SECRET")
}
}
}
}
EOF
./gradlew :common:publish
env:
JB_SPACE_INTELLIJ_CLIENT_ID: ${{ secrets.MAVEN_SPACE_USERNAME }}
JB_SPACE_INTELLIJ_CLIENT_SECRET: ${{ secrets.MAVEN_SPACE_PASSWORD }}
Expand Down
30 changes: 0 additions & 30 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,33 +37,3 @@ tasks.register<Jar>("jarSources") {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}

publishing {
publications {
create<MavenPublication>("common") {
groupId = group.toString()
artifactId = "cli"
version = version.toString()
from(components["java"])
artifact(tasks["jarSources"])
pom {
url.set("https://github.com/JetBrains/qodana-action")
licenses {
license {
name.set("Apache-2.0")
url.set("https://github.com/JetBrains/qodana-action/blob/main/LICENSE")
}
}
}
}
}
repositories {
maven {
url = uri("https://packages.jetbrains.team/maven/p/sa/maven-public")
credentials {
username = System.getenv("JB_SPACE_INTELLIJ_CLIENT_ID")
password = System.getenv("JB_SPACE_INTELLIJ_CLIENT_SECRET")
}
}
}
}

0 comments on commit 18aa0d7

Please sign in to comment.