forked from devnatan/inventory-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish.gradle
More file actions
46 lines (38 loc) · 1.28 KB
/
publish.gradle
File metadata and controls
46 lines (38 loc) · 1.28 KB
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
apply plugin: 'maven-publish'
project.afterEvaluate {
final def project = it
publishing {
publications {
jitpack(MavenPublication) {
configurePublication(project, it)
}
}
}
}
tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false
}
@SuppressWarnings('unused')
def configurePublication(Project project, Publication publication) {
publication.groupId = 'com.github.DevNatan'
final def base = 'inventory-framework'
def fixedName = base + '-' + project.name
if (project.name == 'bom') fixedName = base
if (project.name == 'framework') fixedName = base + '-shared'
publication.artifactId = fixedName
publication.from components.java
publication.pom {
url.set('https://gihub.com/DevNatan/inventory-framework.git')
licenses {
license {
name = 'MIT license'
url = 'https://github.com/DevNatan/inventory-framework/blob/main/LICENSE'
}
}
scm {
connection = 'scm:git:git://github.com/DevNatan/inventory-framework.git'
developerConnection = 'scm:git:ssh://github.com/DevNatan/inventory-framework.git'
url = 'https://github.com/DevNatan/inventory-framework'
}
}
}