Skip to content

Commit

Permalink
Merge pull request #51 from rahulsom/build-with-gradle-and-waena
Browse files Browse the repository at this point in the history
chore: Use Gradle and Waena to build
  • Loading branch information
rahulsom authored Jan 14, 2023
2 parents 484efca + ee05872 commit f6c996f
Show file tree
Hide file tree
Showing 15 changed files with 450 additions and 368 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Gradle Build

on:
pull_request:
branches: ['*']
push:
branches: ['*']
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
build:
uses: rahulsom/_/.github/workflows/gradle.yml@main
with:
java-version: 8
secrets:
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_sonatypePassword }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }}
85 changes: 0 additions & 85 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/maven.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,13 @@ crashlytics-build.properties
bin/
out/
.settings/

### Gradle template
.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
8 changes: 0 additions & 8 deletions .mvn/extensions.xml

This file was deleted.

21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

66 changes: 0 additions & 66 deletions addServer.py

This file was deleted.

72 changes: 72 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
plugins {
id("java-library")
id("groovy")
id("com.github.rahulsom.waena.root").version("0.6.1")
id("com.github.rahulsom.waena.published").version("0.6.1")
id("com.github.dkorotych.gradle-maven-exec").version("3.0")
}

repositories {
mavenCentral()
}

dependencies {
api("org.jvnet.jaxb2_commons:jaxb2-basics-runtime:1.11.1-PUBLISHED-BY-MISTAKE")
api("commons-lang:commons-lang:2.6")
testImplementation("junit:junit:4.13.2")
testImplementation("xmlunit:xmlunit:1.6")
testImplementation("org.spockframework:spock-core:2.3-groovy-4.0")
testImplementation("org.apache.cxf:cxf-rt-frontend-jaxws:4.0.0")
testImplementation("org.apache.cxf:cxf-rt-transports-http:4.0.0")
compileOnly("com.sun.xml.bind:jaxb-impl:2.3.7")
}

group = "com.github.rahulsom"
description = "IHE ITI"

configure<nebula.plugin.contacts.ContactsExtension> {
validateEmails = true
addPerson("[email protected]", delegateClosureOf<nebula.plugin.contacts.Contact> {
moniker("Rahul Somasunderam")
roles("owner")
github("https://github.com/rahulsom")
})
}

val generateClients = tasks.create<com.github.dkorotych.gradle.maven.exec.MavenExec>("generateClients") {
goals("generate-sources")
inputs.dir("src/main/resources")
inputs.file("pom.xml")
inputs.file("maven/maven-wrapper.properties")
outputs.dir("target")
}

tasks.getByName("compileJava").dependsOn(generateClients)
tasks.getByName("sourceJar").dependsOn(generateClients)

sourceSets {
main {
java {
srcDir("target/generated-sources/cda")
srcDir("target/generated-sources/ihe")
}
}
}

tasks.withType<Javadoc>().configureEach {
options {
(this as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet")
}
}

tasks.getByName<Delete>("clean") {
delete.add("target")
}

tasks.getByName<Jar>("sourceJar") {
exclude("**/sun-jaxb.episode")
}

tasks.withType<Test>().configureEach {
useJUnitPlatform()
}
12 changes: 0 additions & 12 deletions build.sh

This file was deleted.

Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit f6c996f

Please sign in to comment.