Skip to content

Commit 88bd5e3

Browse files
authored
Merge pull request #3 from manuelarte/upload
Upload
2 parents 0546c91 + 16f7ca1 commit 88bd5e3

File tree

24 files changed

+95
-63
lines changed

24 files changed

+95
-63
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,9 @@ Extension for the [Spring Data Repository](https://docs.spring.io/spring-data/jp
156156
Feel free to create a PR or suggest improvements or ideas.
157157

158158
[spring-boot](https://spring.io/projects/spring-boot)
159+
160+
## Publish
161+
162+
To publish a new version use:
163+
164+
> ./gradlew publish

β€Žbuild.gradle.ktsβ€Ž

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1+
import org.jreleaser.model.Active
12
import org.springframework.boot.gradle.tasks.bundling.BootJar
23

34
plugins {
45
java
56
id("java-library")
67
id("org.springframework.boot") version "3.4.1"
78
id("io.spring.dependency-management") version "1.1.7"
9+
id("signing")
810
id("maven-publish")
11+
id("org.jreleaser") version "1.16.0"
912
}
1013

11-
group = "com.github.manuelarte"
14+
group = "io.github.manuelarte"
1215
version = "0.0.1"
1316

1417
java {
18+
withJavadocJar()
19+
withSourcesJar()
1520
toolchain {
1621
languageVersion = JavaLanguageVersion.of(17)
1722
}
@@ -58,17 +63,27 @@ tasks.getByName<Jar>("jar") {
5863
enabled = true
5964
}
6065

66+
tasks.javadoc {
67+
if (JavaVersion.current().isJava9Compatible) {
68+
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
69+
}
70+
}
71+
6172
publishing {
6273
publications {
63-
create<MavenPublication>("maven") {
74+
create<MavenPublication>("mavenJava") {
6475
groupId = groupId
6576
artifactId = artifactId
66-
version = version
67-
6877
from(components["java"])
69-
}
78+
versionMapping {
79+
usage("java-api") {
80+
fromResolutionOf("runtimeClasspath")
81+
}
82+
usage("java-runtime") {
83+
fromResolutionResult()
84+
}
85+
}
7086

71-
create<MavenPublication>("mavenJava") {
7287
pom {
7388
name = "Spring-Utils"
7489
description = "Spring Boot utility features"
@@ -94,4 +109,13 @@ publishing {
94109
}
95110
}
96111
}
112+
repositories {
113+
maven {
114+
url = uri(layout.buildDirectory.dir("staging-deploy"))
115+
}
116+
}
117+
}
118+
119+
signing {
120+
sign(publishing.publications["mavenJava"])
97121
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package com.github.manuelarte.springutils.constraints;
1+
package io.github.manuelarte.springutils.constraints;
22

33

4-
import com.github.manuelarte.springutils.validators.ExistsValidator;
4+
import io.github.manuelarte.springutils.validators.ExistsValidator;
55
import jakarta.validation.Constraint;
66
import jakarta.validation.Payload;
77

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package com.github.manuelarte.springutils.constraints;
1+
package io.github.manuelarte.springutils.constraints;
22

3-
import com.github.manuelarte.springutils.validators.FromToDateCrossParameterValidator;
4-
import com.github.manuelarte.springutils.validators.FromToDateTypeValidator;
3+
import io.github.manuelarte.springutils.validators.FromToDateCrossParameterValidator;
4+
import io.github.manuelarte.springutils.validators.FromToDateTypeValidator;
55
import jakarta.validation.Constraint;
66
import jakarta.validation.ConstraintTarget;
77
import jakarta.validation.Payload;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.manuelarte.springutils.constraints.fromto;
1+
package io.github.manuelarte.springutils.constraints.fromto;
22

33
import java.lang.annotation.*;
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.manuelarte.springutils.constraints.fromto;
1+
package io.github.manuelarte.springutils.constraints.fromto;
22

33
import java.lang.annotation.*;
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.manuelarte.springutils.constraints.groups;
1+
package io.github.manuelarte.springutils.constraints.groups;
22

33
/**
44
* Validation to be used in the validation group when a new entity is created.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.manuelarte.springutils.constraints.groups;
1+
package io.github.manuelarte.springutils.constraints.groups;
22

33
/**
44
* Validation to be used in the validation group when a partial updated is needed.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.manuelarte.springutils.constraints.groups;
1+
package io.github.manuelarte.springutils.constraints.groups;
22

33
/**
44
* Validation to be used in the validation group when an updated is needed.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.manuelarte.springutils.repositories;
1+
package io.github.manuelarte.springutils.repositories;
22

33
import org.springframework.beans.BeanUtils;
44
import org.springframework.data.repository.CrudRepository;

0 commit comments

Comments
Β (0)