-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
76 lines (62 loc) · 1.6 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
plugins {
id 'java-library'
id 'maven-publish'
id "eu.davidea.grabver" version "2.0.2"
}
versioning {
major 1
minor 1
}
group 'dk.polytope'
version versioning.name
sourceCompatibility = 1.8
sourceSets {
main.java {
srcDir "src/main/java"
}
}
jar {
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': versioning.name
)
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier.set("sources")
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.hibernate:hibernate-core:5.4.30.Final'
implementation group: 'javax.persistence', name: 'javax.persistence-api', version: '2.2'
}
publishing {
repositories {
maven {
url = uri("https://maven.pkg.github.com/polytope/jpa-utils")
credentials {
username = System.getenv("GITHUB_MVN_USERNAME") ?: System.getenv("MVN_USERNAME_GITHUB")
password = System.getenv("GITHUB_MVN_TOKEN") ?: System.getenv("MVN_TOKEN_GITHUB")
}
}
}
publications {
gpr(MavenPublication) {
groupId = project.group
artifactId = project.name
pom {
name = 'JPA Utils'
description = 'a collection of JPA utilities which are used in Polytope\'s codebases.'
url = 'https://github.com/polytope/jpa-utils'
}
from components.java
afterEvaluate {
artifact sourcesJar
}
}
}
}