1
0

build.gradle 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. }
  5. }
  6. plugins {
  7. id 'java-library'
  8. id 'idea'
  9. id 'com.github.johnrengelman.shadow' version '6.1.0'
  10. id 'maven-publish'
  11. }
  12. group 'com.github.kimbeejay'
  13. version '1.0.1'
  14. sourceCompatibility = '1.8'
  15. targetCompatibility = '1.8'
  16. repositories {
  17. mavenCentral()
  18. jcenter()
  19. }
  20. apply plugin: "com.github.johnrengelman.shadow"
  21. dependencies {
  22. compileOnly group: 'org.jetbrains', name: 'annotations', version: '20.1.0'
  23. compileOnly group: 'com.typesafe', name: 'config', version: '1.4.1'
  24. compileOnly group: 'com.jason-goodwin', name: 'better-monads', version: '0.4.1'
  25. compileOnly 'org.slf4j:slf4j-simple:1.7.30'
  26. compileOnly 'org.apache.kafka:kafka-streams:2.5.0'
  27. compileOnly 'org.apache.avro:avro:1.10.1'
  28. testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
  29. testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
  30. }
  31. jar {
  32. manifest {
  33. attributes(
  34. "Class-Path": configurations.compileClasspath.collect { it.getName() }.join(" "),
  35. "Git-CommitId": "git rev-parse HEAD".execute().text.trim(),
  36. "Build-Time": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  37. )
  38. }
  39. }
  40. shadowJar {
  41. archiveBaseName.set(rootProject.name)
  42. archiveClassifier.set("")
  43. manifest {
  44. inheritFrom project.tasks.jar.manifest
  45. }
  46. }
  47. publishing {
  48. repositories {
  49. maven {
  50. name = "GitHubPackages"
  51. url = uri("https://maven.pkg.github.com/kimbeejay/kstreams")
  52. credentials {
  53. username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
  54. password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
  55. }
  56. }
  57. }
  58. publications {
  59. gpr(MavenPublication) {
  60. from(components.java)
  61. }
  62. }
  63. }
  64. test {
  65. useJUnitPlatform()
  66. }