-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
72 lines (62 loc) · 1.91 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
buildscript {
ext{
odcPluginVersion = project.hasProperty('odcGradlePluginVersion') ? project.getProperty('odcGradlePluginVersion') : '6.3.1'
}
repositories {
mavenCentral()
}
}
apply plugin: 'java'
apply plugin: 'maven-publish'
group 'ai.levo'
version '0.1.13'
def burpExtensionHomepage = 'https://github.com/levoai/levoai-burp-extension'
def burpExtensionJarName = 'LevoAiBurpExtension.jar'
repositories {
mavenCentral()
}
dependencies {
implementation('net.portswigger.burp.extender:burp-extender-api:2.3')
implementation('com.fasterxml.jackson.core:jackson-databind:2.16.2')
}
compileJava {
targetCompatibility '11'
sourceCompatibility '11'
}
task fatJar(type: Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes("Implementation-Version": project.version, "Implementation-Title": project.name, "Implementation-URL": burpExtensionHomepage)
}
archiveFileName = burpExtensionJarName
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task addVersionToProperties(dependsOn: processResources) {
doLast {
def props = new Properties()
file("$buildDir/resources/main/settings.properties").withInputStream { props.load(it) }
props["version"] = project.version.toString()
file("$buildDir/resources/main/settings.properties").withOutputStream { props.store(it, null) }
}
}
classes {
dependsOn addVersionToProperties
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/levoai/levoai-burp-extension")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
artifact fatJar
}
}
}