Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix publication validator not looking in the local maven repository #1880

Merged
merged 1 commit into from
Mar 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions publication-validator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

apply from: rootProject.file("gradle/compile-jvm.gradle")

def coroutines_version = version // all modules share the same version

repositories {
mavenLocal()
mavenCentral()
Expand All @@ -14,8 +16,6 @@ dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.apache.commons:commons-compress:1.18'
testCompile 'com.google.code.gson:gson:2.8.5'
testCompile project(':kotlinx-coroutines-core')
testCompile project(':kotlinx-coroutines-android')
}

compileTestKotlin {
Expand All @@ -26,7 +26,14 @@ def dryRunNpm = properties['dryRun']

test {
onlyIf { dryRunNpm == "true" } // so that we don't accidentally publish anything, especially before the test
doFirst { println "Verifying publishing version $version" } // all modules share the same version
doFirst {
println "Verifying publishing version $coroutines_version"
// we can't depend on the subprojects because we need to test the classfiles that are published in the end.
// also, we can't put this in the `dependencies` block because the resolution would happen before publication.
classpath += project.configurations.detachedConfiguration(
project.dependencies.create("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"),
project.dependencies.create("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"))
}
environment "projectRoot", project.rootDir
environment "deployVersion", version
if (dryRunNpm == "true") { // `onlyIf` only affects execution of the task, not the dependency subtree
Expand Down