-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored as a multi-module project
- Loading branch information
1 parent
0d769fe
commit 5b79fc5
Showing
329 changed files
with
13,089 additions
and
1,440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,167 +1,149 @@ | ||
import java.time.Year | ||
|
||
plugins { | ||
id 'groovy' | ||
id 'application' | ||
id "biz.aQute.bnd.builder" version "5.1.2" | ||
id 'java-library' | ||
id 'maven-publish' | ||
id 'signing' | ||
id 'pl.allegro.tech.build.axion-release' version '1.13.6' | ||
id 'org.cadixdev.licenser' version '0.6.1' | ||
id 'org.javamodularity.moduleplugin' version '1.8.13' apply false | ||
} | ||
|
||
java { | ||
registerFeature('jettyHttp') { | ||
usingSourceSet(sourceSets.main) | ||
scmVersion { | ||
tag { | ||
prefix = 'coucou-' | ||
} | ||
versionCreator 'versionWithBranch' | ||
branchVersionCreator = ['main': 'simple'] | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
maven { | ||
url 'https://s01.oss.sonatype.org/content/repositories/snapshots' | ||
license { | ||
header = project.file('HEADER.txt') | ||
// skipExistingHeaders = true | ||
include '**/*.java' | ||
properties { | ||
year = Year.now().value | ||
} | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
dependencies { | ||
implementation "org.ical4j:ical4j-command:$ical4jCommandVersion", | ||
"org.ical4j:ical4j-serializer:$ical4jSerializerVersion", | ||
"org.ical4j:ical4j-connector-api:$ical4jConnectorVersion", | ||
"org.mnode.ical4j:ical4j-vcard:$ical4jVCardVersion", | ||
"org.mnode.ical4j:ical4j:$ical4jVersion" | ||
configure(subprojects) { | ||
apply plugin: 'java-library' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'groovy' | ||
apply plugin: 'biz.aQute.bnd.builder' | ||
apply plugin: 'org.javamodularity.moduleplugin' | ||
|
||
implementation ("org.eclipse.jetty:jetty-server:$jettyVersion") { | ||
exclude group: 'org.slf4j', module: 'slf4j-api' | ||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
maven { | ||
url 'https://s01.oss.sonatype.org/content/repositories/snapshots' | ||
} | ||
} | ||
implementation ("org.eclipse.jetty:jetty-servlet:$jettyVersion") { | ||
exclude group: 'org.slf4j', module: 'slf4j-api' | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
// auth | ||
implementation 'org.pac4j:jersey3-pac4j:6.0.0', | ||
'org.pac4j:pac4j-http:6.0.0-RC10' | ||
|
||
implementation "info.picocli:picocli:$picocliVersion" | ||
dependencies { | ||
|
||
implementation 'jakarta.ws.rs:jakarta.ws.rs-api:3.1.0' | ||
implementation "org.glassfish.hk2:hk2-api:$hk2Version", "org.glassfish.hk2:hk2-utils:$hk2Version", | ||
"org.glassfish.hk2:hk2-locator:$hk2Version", 'jakarta.inject:jakarta.inject-api:2.0.1', | ||
'jakarta.annotation:jakarta.annotation-api:2.1.1' | ||
|
||
// implementation 'com.google.inject:guice:7.0.0' | ||
implementation "org.apache.logging.log4j:log4j-core:$log4jVersion" | ||
|
||
// swagger | ||
implementation "io.swagger.core.v3:swagger-jaxrs2-jakarta:2.2.7", | ||
"io.swagger.core.v3:swagger-jaxrs2-servlet-initializer-jakarta:2.2.7", | ||
"javax.xml.bind:jaxb-api:2.2.11" | ||
|
||
// spock | ||
testImplementation platform("org.spockframework:spock-bom:2.1-groovy-3.0"), | ||
"org.spockframework:spock-core" | ||
|
||
jettyHttpImplementation 'org.glassfish.jersey.containers:jersey-container-jetty-http:3.1.1', | ||
'org.glassfish.jersey.inject:jersey-hk2:3.1.1', | ||
'org.glassfish.jersey.media:jersey-media-json-jackson:3.1.1' | ||
|
||
runtimeOnly "org.slf4j:slf4j-log4j12:$slf4jVersion", "org.apache.logging.log4j:log4j:$log4jVersion" | ||
} | ||
annotationProcessor 'org.glassfish.hk2:hk2-metadata-generator:3.0.6' | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
// implementation 'com.google.inject:guice:7.0.0' | ||
|
||
license { | ||
header = project.file('HEADER.txt') | ||
// skipExistingHeaders = true | ||
include '**/*.java' | ||
properties { | ||
year = Year.now().value | ||
} | ||
} | ||
// spock | ||
testImplementation platform("org.spockframework:spock-bom:2.1-groovy-3.0"), | ||
"org.spockframework:spock-core" | ||
|
||
javadoc { | ||
options { | ||
links 'https://docs.oracle.com/en/java/javase/11/docs/api/', | ||
'http://ical4j.github.io/docs/ical4j/api/3.1.0/', | ||
'http://fasterxml.github.io/jackson-core/javadoc/2.13/', | ||
'http://fasterxml.github.io/jackson-databind/javadoc/2.13/', | ||
'http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.13/' | ||
} | ||
} | ||
// | ||
// compileTestJava { | ||
// moduleOptions { | ||
// compileOnClasspath = true | ||
// } | ||
// } | ||
|
||
test { | ||
moduleOptions { | ||
runOnClasspath = true | ||
} | ||
useJUnitPlatform() | ||
} | ||
|
||
scmVersion { | ||
tag { | ||
prefix = 'coucou-' | ||
javadoc { | ||
options { | ||
links 'https://docs.oracle.com/en/java/javase/11/docs/api/', | ||
'http://ical4j.github.io/docs/ical4j/api/3.1.0/', | ||
'http://fasterxml.github.io/jackson-core/javadoc/2.13/', | ||
'http://fasterxml.github.io/jackson-databind/javadoc/2.13/', | ||
'http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.13/' | ||
} | ||
} | ||
versionCreator 'versionWithBranch' | ||
branchVersionCreator = ['main': 'simple'] | ||
} | ||
|
||
group = 'org.coucal' | ||
description = 'A command framework for calendaring, scheduling and resource management' | ||
version = scmVersion.version | ||
|
||
jar { | ||
manifest { | ||
attributes ( | ||
'Implementation-Title': 'Coucal', | ||
'Implementation-Version': version, | ||
'Implementation-Vendor': 'C O U C O U L A N D' | ||
) | ||
group = 'org.coucal' | ||
description = 'A command framework for calendaring, scheduling and resource management' | ||
version = scmVersion.version | ||
|
||
jar { | ||
manifest { | ||
attributes( | ||
'Implementation-Title': 'Coucal', | ||
'Implementation-Version': version, | ||
'Implementation-Vendor': 'Node Logic' | ||
) | ||
} | ||
} | ||
} | ||
|
||
ext { | ||
isReleaseVersion = !version.endsWith("SNAPSHOT") | ||
} | ||
ext { | ||
isReleaseVersion = !version.endsWith("SNAPSHOT") | ||
} | ||
|
||
publishing { | ||
publications { | ||
coucou(MavenPublication) { | ||
from components.java | ||
pom.withXml { | ||
asNode().appendNode('name', project.name) | ||
asNode().appendNode('description', project.description) | ||
asNode().appendNode('url', 'https://www.coucal.org') | ||
|
||
def scmNode = asNode().appendNode('scm') | ||
scmNode.appendNode('url', 'https://github.com/coucouland/coucal') | ||
scmNode.appendNode('connection', 'scm:[email protected]:coucouland/coucal.git') | ||
scmNode.appendNode('developerConnection', 'scm:[email protected]:coucouland/coucal.git') | ||
|
||
def licenseNode = asNode().appendNode('licenses').appendNode('license') | ||
licenseNode.appendNode('name', 'Coucou - License') | ||
licenseNode.appendNode('url', 'https://raw.githubusercontent.com/coucouland/coucal/master/LICENSE') | ||
licenseNode.appendNode('distribution', 'repo') | ||
|
||
def developerNode = asNode().appendNode('developers').appendNode('developer') | ||
developerNode.appendNode('id', 'fortuna') | ||
developerNode.appendNode('name', 'Ben Fortuna') | ||
publishing { | ||
publications { | ||
coucou(MavenPublication) { | ||
from components.java | ||
pom.withXml { | ||
asNode().appendNode('name', project.name) | ||
asNode().appendNode('description', project.description) | ||
asNode().appendNode('url', 'https://www.coucal.org') | ||
|
||
def scmNode = asNode().appendNode('scm') | ||
scmNode.appendNode('url', 'https://github.com/coucouland/coucal') | ||
scmNode.appendNode('connection', 'scm:[email protected]:coucouland/coucal.git') | ||
scmNode.appendNode('developerConnection', 'scm:[email protected]:coucouland/coucal.git') | ||
|
||
def licenseNode = asNode().appendNode('licenses').appendNode('license') | ||
licenseNode.appendNode('name', 'Coucou - License') | ||
licenseNode.appendNode('url', 'https://raw.githubusercontent.com/coucouland/coucal/master/LICENSE') | ||
licenseNode.appendNode('distribution', 'repo') | ||
|
||
def developerNode = asNode().appendNode('developers').appendNode('developer') | ||
developerNode.appendNode('id', 'fortuna') | ||
developerNode.appendNode('name', 'Ben Fortuna') | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "OSSRH" | ||
url = version.endsWith('SNAPSHOT') ? "https://oss.sonatype.org/content/repositories/snapshots/" : "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
credentials { | ||
username = System.getenv("MAVEN_USERNAME") | ||
password = System.getenv("MAVEN_PASSWORD") | ||
repositories { | ||
maven { | ||
name = "OSSRH" | ||
url = version.endsWith('SNAPSHOT') ? "https://oss.sonatype.org/content/repositories/snapshots/" : "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
credentials { | ||
username = System.getenv("MAVEN_USERNAME") | ||
password = System.getenv("MAVEN_PASSWORD") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
required { isReleaseVersion } | ||
sign publishing.publications.coucou | ||
} | ||
|
||
application { | ||
mainClass = 'org.coucal.CoucalMain' | ||
} | ||
signing { | ||
required { isReleaseVersion } | ||
sign publishing.publications.coucou | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
java { | ||
registerFeature('jettyHttp') { | ||
usingSourceSet(sourceSets.main) | ||
} | ||
} | ||
|
||
dependencies { | ||
api project(':coucal-core'), "org.ical4j:ical4j-serializer:$ical4jSerializerVersion" | ||
|
||
api 'org.glassfish.jersey.containers:jersey-container-jetty-http:3.1.1' | ||
|
||
api 'jakarta.ws.rs:jakarta.ws.rs-api:3.1.0' | ||
|
||
// auth | ||
implementation 'org.pac4j:jersey3-pac4j:6.0.0', | ||
'org.pac4j:pac4j-core:6.0.0-RC10', 'org.pac4j:pac4j-http:6.0.0-RC10' | ||
|
||
// swagger | ||
implementation "io.swagger.core.v3:swagger-jaxrs2-jakarta:2.2.7", | ||
// "io.swagger.core.v3:swagger-jaxrs2-servlet-initializer-jakarta:2.2.7", | ||
"javax.xml.bind:jaxb-api:2.2.11" | ||
|
||
jettyHttpApi 'org.glassfish.jersey.inject:jersey-hk2:3.1.1', | ||
'org.glassfish.jersey.media:jersey-media-json-jackson:3.1.1' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module coucal.api { | ||
requires java.base; | ||
requires coucal.core; | ||
requires ical4j.serializer; | ||
|
||
requires jakarta.ws.rs; | ||
requires jakarta.inject; | ||
requires io.swagger.v3.oas.annotations; | ||
requires io.swagger.v3.jaxrs2; | ||
requires org.glassfish.hk2.api; | ||
requires org.slf4j; | ||
requires com.fasterxml.jackson.databind; | ||
requires com.fasterxml.jackson.dataformat.xml; | ||
requires jersey.server; | ||
|
||
exports org.coucal.api; | ||
exports org.coucal.api.controller; | ||
exports org.coucal.api.controller.workflow; | ||
exports org.coucal.api.controller.channel; | ||
exports org.coucal.api.controller.filter; | ||
exports org.coucal.api.controller.repository; | ||
exports org.coucal.api.controller.role; | ||
exports org.coucal.api.controller.subscription; | ||
exports org.coucal.api.controller.user; | ||
exports org.coucal.api.controller.workspace; | ||
exports org.coucal.api.provider; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.