Skip to content

Commit ed2aad0

Browse files
committed
simplify publishing versioning
1 parent e1ba646 commit ed2aad0

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ Build the library and publish to local maven:
7373
./gradlew publishToMavenLocal
7474
```
7575

76-
To set a specific version on your library:
77-
```bash
78-
./gradlew publishToMavenLocal -PprojectVersion=0.0.1-mysemanticversion
79-
```
80-
8176
### Usage
8277
#### Add Build Dependency (Gradle)
8378
Ensure the following repositories are added to your gradle build:

build.gradle

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ buildscript {
1212
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
1313
classpath 'io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1'
1414
classpath "io.micronaut.docs:micronaut-docs-asciidoc-extensions:$micronautDocsVersion", {
15-
exclude group:"com.github.jengelman.gradle.plugins"
15+
exclude group: "com.github.jengelman.gradle.plugins"
1616
}
1717
classpath "io.micronaut.docs:micronaut-docs-gradle-plugins:$micronautDocsVersion", {
18-
exclude group:"com.github.jengelman.gradle.plugins"
18+
exclude group: "com.github.jengelman.gradle.plugins"
1919
}
2020
classpath 'com.adarshr:gradle-test-logger-plugin:2.0.0'
2121
}
@@ -26,11 +26,9 @@ repositories {
2626
}
2727

2828
group "ai.stainless"
29-
version projectVersion
3029

3130
subprojects { Project subproject ->
3231
group "ai.stainless"
33-
version project.projectVersion
3432

3533
repositories {
3634
mavenLocal()
@@ -54,7 +52,7 @@ subprojects { Project subproject ->
5452
jar {
5553
manifest {
5654
attributes('Automatic-Module-Name': "${subproject.group}.${subproject.name}".replaceAll('[^\\w\\.\\$_]', "_"))
57-
attributes('Implementation-Version':project.projectVersion)
55+
attributes('Implementation-Version': version)
5856
attributes('Implementation-Title': 'Micronaut Jupyter')
5957
}
6058
}
@@ -84,17 +82,17 @@ subprojects { Project subproject ->
8482
}
8583

8684
javadoc {
87-
if(JavaVersion.current().isJava9Compatible()) {
85+
if (JavaVersion.current().isJava9Compatible()) {
8886
options.addBooleanOption('html5', true)
8987
}
9088
}
9189

9290
publishing {
9391
repositories {
9492
def ossUser = System.getenv("SONATYPE_USERNAME") ?:
95-
project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
93+
project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
9694
def ossPass = System.getenv("SONATYPE_PASSWORD") ?:
97-
project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
95+
project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
9896

9997
maven {
10098
name = "mavenCentral"
@@ -128,7 +126,7 @@ subprojects { Project subproject ->
128126
File signingKeyFile = new File("$rootProject.projectDir/SIGNING_GPG_KEY")
129127
String signingKey = signingKeyFile.exists() ? signingKeyFile.text : ""
130128
def signingPassword = System.getenv("SIGNING_GPG_PASSWORD") ?:
131-
findProperty("signingPassword") ?: ''
129+
findProperty("signingPassword") ?: ''
132130
useInMemoryPgpKeys(signingKey, signingPassword)
133131
}
134132

gradle.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
group=ai.stainless
22
version=1.1.0
3-
#@see build.gradle:133
4-
projectVersion="${project.version}"
53
# Beakerx2 is not yet deployed to a public repository and must be built from sources
64
# @see https://github.com/stainlessai/beakerx-jlab2
75
beakerxVersion=2.1-SNAPSHOT

jupyter/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ groovydoc {
204204

205205
publishing {
206206
publications {
207-
jupyterConfigurationLibrary(MavenPublication) {
207+
micronautJupyter(MavenPublication) {
208208
artifactId = 'micronaut-jupyter'
209209
from components.java
210210
artifact sourcesJar

0 commit comments

Comments
 (0)