forked from albinowax/albinowaxUtils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
72 lines (63 loc) · 1.99 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
plugins {
id 'java'
id 'maven-publish'
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenCentral()
}
dependencies {
implementation 'net.portswigger.burp.extender:burp-extender-api:2.3'
implementation 'net.portswigger.burp.extensions:montoya-api:2023.10.3'
implementation 'org.apache.commons:commons-lang3:3.5'
implementation group: 'org.apache.commons', name: 'commons-collections4', version: '4.1'
}
sourceSets {
main {
java {
srcDir 'src'
}
}
}
group = 'libary'
version = '1.4'
archivesBaseName = 'albinowax-utils'
// Suppress deprecation warnings during compilation
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:-deprecation"
}
tasks.register('fatJar', Jar) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
archiveClassifier.set('fat') // Remove classifier so this becomes the primary artifact
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
with(tasks.getByName("jar"))
}
publishing {
publications {
gpr(MavenPublication) {
artifactId 'albinowax-utils' //This has to be all lowercase or you'll get a horrible 422 error
artifact(tasks.named('fatJar').get()){
classifier = 'fat'
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/portswigger-katie/albinowaxUtils")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
}
// Explicit dependency for generateMetadataFileForGprPublication
tasks.named('generateMetadataFileForGprPublication').configure {
dependsOn tasks.named('fatJar')
}