Skip to content

Instantly share code, notes, and snippets.

@tzolov
Last active May 12, 2020 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tzolov/0a0c414ee6517519f7d32ba83fe45fd5 to your computer and use it in GitHub Desktop.
Save tzolov/0a0c414ee6517519f7d32ba83fe45fd5 to your computer and use it in GitHub Desktop.
sample-gradle
plugins {
id 'org.springframework.boot' version '2.1.7.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
// id 'java'
id 'java-library'
id 'eclipse'
id 'maven-publish'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '8'
java {
withJavadocJar()
withSourcesJar()
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud.stream.app:analytics-app-dependencies:2.1.2.RELEASE"
mavenBom "org.springframework.cloud.stream.app:app-starters-core-dependencies:2.1.2.RELEASE"
}
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter-actuator')
implementation 'org.springframework.boot:spring-boot-starter'
implementation('org.springframework.boot:spring-boot-starter-web')
// compile('org.springframework.cloud:spring-cloud-stream-binder-rabbit')
implementation('org.springframework.cloud:spring-cloud-starter-stream-kafka')
implementation('io.micrometer:micrometer-registry-prometheus')
implementation('io.micrometer.prometheus:prometheus-rsocket-spring')
implementation('org.springframework.cloud.stream.app:app-starters-micrometer-common')
implementation('org.springframework.cloud.stream.app:app-starters-security-common')
implementation('org.springframework.boot:spring-boot-configuration-processor')
implementation('org.springframework.cloud.stream.app:spring-cloud-starter-stream-sink-counter')
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
testImplementation('org.springframework.boot:spring-boot-starter-test')
// implementation("io.micrometer:micrometer-registry-prometheus:1.3.3")
// implementation('io.micrometer:micrometer-core:1.3.3')
}
test {
useJUnitPlatform()
}
publishing {
publications {
mavenJava(MavenPublication) {
pom {
afterEvaluate {
name = project.description
description = project.description
}
}
versionMapping {
usage('java-api') {
fromResolutionResult()
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
//
// mavenJava(MavenPublication) {
// suppressAllPomMetadataWarnings()
// from components.java
// }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment