Skip to content

Commit

Permalink
Fixed publication root for standalone projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr3zee committed Jun 19, 2024
1 parent 6825315 commit 4add5cf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import util.getSensitiveProperty

val isGradlePlugin = project.properties["kotlinx.rpc.gradle.plugin"] == "true"
val publishingExtension = project.extensions.findByType<PublishingExtension>()
val globalRootDir: String by extra

if (name.startsWith("kotlinx-rpc")) { // only public modules
if (publishingExtension == null) {
Expand Down Expand Up @@ -117,9 +118,7 @@ fun RepositoryHandler.configureSpaceRepository() {

fun RepositoryHandler.configureLocalDevRepository() {
// Something that's straightforward to "clean" for development, not mavenLocal
// IMPORTANT: for gradle plugins 'rootProject' is 'gradle-plugin', not 'kotlinx-rpc'
val buildDir = rootProject.layout.buildDirectory.get()
maven("$buildDir/repo") {
maven("$globalRootDir/build/repo") {
name = "buildRepo"
}
}
Expand Down
12 changes: 12 additions & 0 deletions publishLocal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

#
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
#

set -euxo pipefail

./gradlew publishAllPublicationsToBuildRepoRepository \
:compiler-plugin:publishAllPublicationsToBuildRepoRepository \
:ksp-plugin:publishAllPublicationsToBuildRepoRepository \
:gradle-plugin:publishAllPublicationsToBuildRepoRepository

0 comments on commit 4add5cf

Please sign in to comment.