Skip to content

Commit c960380

Browse files
authored
Merge pull request #104 from reactive-commons/feature/rm
fix(rm): Fix release to maven
2 parents fbd7e5b + 5015165 commit c960380

File tree

2 files changed

+74
-62
lines changed

2 files changed

+74
-62
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@ jobs:
2020
issues: true
2121
issuesWoLabels: true
2222
stripGeneratorNotice: true
23-
- name: Push Changelog
24-
uses: github-actions-x/[email protected]
25-
with:
26-
github-token: ${{ secrets.GITHUB_TOKEN }}
27-
push-branch: 'master'
28-
commit-message: 'Automatic docs and changelog generation [skip ci]'
29-
force-add: 'true'
30-
files: CHANGELOG.md
31-
name: ${{ github.actor }}
32-
email: ${{ github.actor }}@users.noreply.github.com
3323
- name: Set up JDK 17
3424
uses: actions/setup-java@v3
3525
with:
@@ -45,3 +35,13 @@ jobs:
4535
env:
4636
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.MAVEN_USERNAME }}
4737
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.MAVEN_PASSWORD }}
38+
- name: Push Changelog
39+
uses: github-actions-x/[email protected]
40+
with:
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
42+
push-branch: 'master'
43+
commit-message: 'Automatic docs and changelog generation [skip ci]'
44+
force-add: 'true'
45+
files: CHANGELOG.md
46+
name: ${{ github.actor }}
47+
email: ${{ github.actor }}@users.noreply.github.com

main.gradle

Lines changed: 64 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
subprojects {
2-
apply plugin: 'java-library'
1+
allprojects {
2+
apply plugin: 'java'
33
apply plugin: 'jacoco'
4-
apply plugin: 'io.spring.dependency-management'
54

65
sourceCompatibility = JavaVersion.VERSION_11
76
targetCompatibility = JavaVersion.VERSION_17
@@ -12,6 +11,25 @@ subprojects {
1211
maven { url 'https://repo.spring.io/milestone' }
1312
}
1413

14+
group 'com.github.bancolombia'
15+
}
16+
17+
nexusPublishing {
18+
repositories {
19+
sonatype()
20+
}
21+
}
22+
23+
subprojects {
24+
apply plugin: 'java-library'
25+
apply plugin: 'io.spring.dependency-management'
26+
27+
ext {
28+
groupId = 'com.github.bancolombia'
29+
}
30+
31+
group = groupId
32+
1533
dependencies {
1634
testImplementation 'org.springframework.boot:spring-boot-starter-test'
1735
testImplementation 'io.projectreactor:reactor-test'
@@ -29,7 +47,7 @@ subprojects {
2947

3048
test {
3149
useJUnitPlatform()
32-
if (System.getProperty("env.ci").equals("true")){
50+
if (System.getProperty("env.ci").equals("true")) {
3351
systemProperty "env.ci", System.getProperty("env.ci")
3452
}
3553

@@ -44,66 +62,66 @@ subprojects {
4462
if (toPublish.split(',').contains(it.name)) {
4563
apply plugin: 'maven-publish'
4664
apply plugin: 'signing'
47-
ext {
48-
groupId = 'org.reactivecommons'
49-
pomConfig = {
50-
licenses {
51-
license {
52-
name 'The Apache Software License, Version 2.0'
53-
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
54-
distribution 'repo'
55-
}
56-
}
57-
developers {
58-
developer {
59-
id 'danielbustamante'
60-
name 'Daniel Bustamante Ospina'
61-
62-
}
63-
}
64-
scm {
65-
url '[email protected]:reactive-commons/reactive-commons-java.git'
66-
}
67-
}
68-
}
6965

7066
group groupId
7167

72-
tasks.register('sourcesJar', Jar) {
73-
dependsOn classes
74-
classifier 'sources'
75-
from sourceSets.main.allJava
68+
tasks.named("jar") {
69+
enabled = true
70+
archiveClassifier = ''
7671
}
7772

78-
tasks.register('javadocJar', Jar) {
79-
dependsOn javadoc
80-
classifier = 'javadoc'
81-
from javadoc.destinationDir
73+
java {
74+
withJavadocJar()
75+
withSourcesJar()
8276
}
8377

78+
javadoc {
79+
if (JavaVersion.current().isJava9Compatible()) {
80+
options.addBooleanOption('html5', true)
81+
}
82+
}
83+
javadoc.failOnError = false
84+
8485
tasks.withType(GenerateModuleMetadata).configureEach {
8586
enabled = false
8687
}
8788

8889
publishing {
8990
publications {
9091
mavenJava(MavenPublication) {
91-
from components.java
92+
pom {
93+
name = artifactId
94+
description = 'Abstract your broker with semantic async messages'
95+
url = 'https://reactivecommons.org/reactive-commons-java'
96+
licenses {
97+
license {
98+
name = 'The Apache Software License, Version 2.0'
99+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
100+
distribution = 'repo'
101+
}
102+
}
103+
developers {
104+
developer {
105+
id = 'danielbustamante'
106+
name = 'Daniel Bustamante Ospina'
107+
108+
}
109+
developer {
110+
id = "juancgalvis"
111+
name = "Juan Carlos Galvis"
112+
113+
}
114+
}
115+
scm {
116+
url = '[email protected]:reactive-commons/reactive-commons-java.git'
117+
}
118+
}
92119

93-
artifact sourcesJar
94-
artifact javadocJar
120+
from components.java
95121

96122
groupId = groupId
97123
artifactId = artifactId
98124
version = project.property('version')
99-
100-
pom.withXml {
101-
def root = asNode()
102-
root.appendNode('description', artifactDescription)
103-
root.appendNode('name', artifactId)
104-
root.appendNode('url', 'http://reactivecommons.org')
105-
root.children().last() + pomConfig
106-
}
107125
}
108126
}
109127
}
@@ -116,12 +134,6 @@ subprojects {
116134
}
117135
}
118136

119-
nexusPublishing {
120-
repositories {
121-
sonatype()
122-
}
123-
}
124-
125137
tasks.named('wrapper') {
126-
gradleVersion = '7.6'
138+
gradleVersion = '8.5'
127139
}

0 commit comments

Comments
 (0)