Skip to content

Commit 29a7148

Browse files
marko-bekhtadreab8
authored andcommitted
HHH-19341 Move publication repositories configuration to a more common gradle file
that is also used by java modules and poms (e.g. platform one)
1 parent c69567b commit 29a7148

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

gradle/published-java-module.gradle

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,26 +96,8 @@ publishing {
9696
}
9797
}
9898
}
99-
repositories {
100-
maven {
101-
name = "staging"
102-
url = rootProject.layout.buildDirectory.dir("staging-deploy${File.separator}maven")
103-
}
104-
maven {
105-
name = 'snapshots'
106-
url = "https://oss.sonatype.org/content/repositories/snapshots/"
107-
// So that Gradle uses the `ORG_GRADLE_PROJECT_snapshotsPassword` / `ORG_GRADLE_PROJECT_snapshotsUsername`
108-
// env variables to read the username/password for the `snapshots` repository publishing:
109-
credentials(PasswordCredentials)
110-
}
111-
}
11299
}
113100

114-
115-
116-
117-
118-
119101
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120102
// Release / publishing tasks
121103

gradle/publishing-pom.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,18 @@ publishing {
5959

6060
}
6161
}
62+
repositories {
63+
maven {
64+
name = "staging"
65+
url = rootProject.layout.buildDirectory.dir("staging-deploy${File.separator}maven")
66+
}
67+
maven {
68+
name = 'snapshots'
69+
url = "https://oss.sonatype.org/content/repositories/snapshots/"
70+
// So that Gradle uses the `ORG_GRADLE_PROJECT_snapshotsPassword` / `ORG_GRADLE_PROJECT_snapshotsUsername`
71+
// env variables to read the username/password for the `snapshots` repository publishing:
72+
credentials(PasswordCredentials)
73+
}
74+
}
6275

6376
}

0 commit comments

Comments
 (0)