Skip to content

Commit

Permalink
publish to a test repository instead of including the main build
Browse files Browse the repository at this point in the history
  • Loading branch information
nnym committed Oct 1, 2022
1 parent a501afd commit ce7aad4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
9 changes: 8 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {

final fatName = name + "-all"
final exports = file("exports.options")
final testProject = file("test/project").toPath()

version("0.3.4")
description("a javac plugin that disables exception checking and other bothersome restrictions")
Expand All @@ -24,7 +25,7 @@ allprojects {

sourceSets {
test {
java.srcDirs = ["test/project/source"]
java.srcDirs = [testProject.resolve("source")]
}
}

Expand Down Expand Up @@ -88,8 +89,14 @@ components.java {
}
}

org.gradle.api.internal.project.DefaultProject project = project

publishing {
repositories {
maven(testProject.resolve("build/repository")) {
name = "test"
}

maven("s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
username(findProperty("ossrh.id"))
password(findProperty("ossrh.password"))
Expand Down
1 change: 1 addition & 0 deletions intellij/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jar {
}

runIde {
dependsOn(rootProject.publishAllPublicationsToTestRepository)
jvmArgs("-Xmx4G")
}

Expand Down
6 changes: 3 additions & 3 deletions test/project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ sourceSets {
}

repositories {
mavenCentral()
mavenLocal()
maven {url = file("build/repository")}
mavenCentral()
}

dependencies {
annotationProcessor("net.auoeke:uncheck")
annotationProcessor("net.auoeke:uncheck:latest.release")
}
5 changes: 0 additions & 5 deletions test/project/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
includeBuild("../..") {
dependencySubstitution {
substitute(module("net.auoeke:uncheck")).using(project(":"))
}
}

0 comments on commit ce7aad4

Please sign in to comment.