1
0

build.gradle 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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-SNAPSHOT'
  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.apache.kafka:kafka-streams:2.5.0'
  26. compileOnly 'org.apache.avro:avro:1.10.1'
  27. testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
  28. testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
  29. }
  30. jar {
  31. manifest {
  32. attributes(
  33. "Class-Path": configurations.compileClasspath.collect { it.getName() }.join(" "),
  34. "Git-CommitId": "git rev-parse HEAD".execute().text.trim(),
  35. "Build-Time": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
  36. )
  37. }
  38. }
  39. shadowJar {
  40. archiveBaseName.set(rootProject.name)
  41. archiveClassifier.set("")
  42. manifest {
  43. inheritFrom project.tasks.jar.manifest
  44. }
  45. }
  46. publishing {
  47. repositories {
  48. maven {
  49. name = "GitHubPackages"
  50. url = uri("https://maven.pkg.github.com/kimbeejay/kstreams")
  51. credentials {
  52. username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
  53. password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
  54. }
  55. }
  56. }
  57. publications {
  58. gpr(MavenPublication) {
  59. from(components.java)
  60. }
  61. }
  62. }
  63. test {
  64. useJUnitPlatform()
  65. }