Skip to content

Commit

Permalink
Merge pull request #617 from wttech/maintenance/gradle-builds-v3
Browse files Browse the repository at this point in the history
Maintenance/gradle builds v3
  • Loading branch information
devzbysiu authored Feb 12, 2021
2 parents 74a9c6f + 5f94fd1 commit 29de8f2
Show file tree
Hide file tree
Showing 36 changed files with 3,391 additions and 2,118 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,16 @@ atlassian-ide-plugin.xml
# aet-vagrant
/vagrant/.vagrant
/vagrant/Berksfile.lock

### Gradle ###
.gradle
build/

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

### Gradle Patch ###
**/build/
37 changes: 37 additions & 0 deletions api/communication-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
plugins {
id("com.cognifide.aet.java-conventions")
id("biz.aQute.bnd.builder")
}

dependencies {
testImplementation("com.googlecode.zohhak:zohhak:1.1.1")
testImplementation("junit:junit:4.11")
testImplementation("org.hamcrest:hamcrest-all:1.3")
testImplementation("commons-io:commons-io:2.6")
testImplementation("com.google.guava:guava:25.1-jre")
implementation("javax.validation:validation-api:1.1.0.Final")
implementation("org.hibernate:hibernate-validator:4.3.2.Final")
implementation("com.google.code.gson:gson:2.8.5")
compileOnly("org.apache.activemq:activemq-osgi:5.15.2")
compileOnly("org.apache.commons:commons-lang3:3.7")
compileOnly("org.jboss.logging:jboss-logging:3.3.2.Final")
compileOnly("commons-io:commons-io:2.6")
}

tasks.jar {
manifest {
attributes(
Pair("Bundle-Vendor", "Cognifide Ltd."),
Pair(
"Export-Package",
"com.cognifide.aet.communication.api;version='3.4.1',com.cognifide.aet.communication.api.exceptions;version='3.4.1',com.cognifide.aet.communication.api.execution;version='3.4.1';uses:='com.cognifide.aet.communication.api.messages',com.cognifide.aet.communication.api.job;version='3.4.1';uses:='com.cognifide.aet.communication.api,com.cognifide.aet.communication.api.metadata',com.cognifide.aet.communication.api.messages;version='3.4.1';uses:='com.cognifide.aet.communication.api',com.cognifide.aet.communication.api.metadata;version='3.4.1';uses:='com.cognifide.aet.communication.api.metadata.exclude,javax.validation',com.cognifide.aet.communication.api.metadata.exclude;version='3.4.1',com.cognifide.aet.communication.api.metadata.gson;version='3.4.1';uses:='com.cognifide.aet.communication.api.metadata,com.google.gson',com.cognifide.aet.communication.api.queues;version='3.4.1';uses:='javax.jms',com.cognifide.aet.communication.api.util;version='3.4.1';uses:='com.cognifide.aet.communication.api.metadata,javax.validation',com.cognifide.aet.communication.api.wrappers;version='3.4.1';uses:='com.cognifide.aet.communication.api.metadata'"
),
Pair(
"Import-Package",
"com.cognifide.aet.communication.api;version='[3.4,4)',com.cognifide.aet.communication.api.messages;version='[3.4,4)',com.cognifide.aet.communication.api.metadata;version='[3.4,4)',com.cognifide.aet.communication.api.metadata.exclude;version='[3.4,4)',com.cognifide.aet.communication.api.metadata.gson;version='[3.4,4)',com.cognifide.aet.communication.api.util;version='[3.4,4)',com.google.common.base;version='[25.1,26)',com.google.common.collect;version='[25.1,26)',com.google.gson;version='[2.8,3)',com.google.gson.reflect;version='[2.8,3)',javax.jms;version='[1.1,2)',javax.validation;version='[1.1,2)',javax.validation.bootstrap;version='[1.1,2)',javax.validation.constraints;version='[1.1,2)',javax.validation.spi;version='[1.1,2)',org.apache.commons.lang3;version='[3.7,4)',org.apache.commons.lang3.builder;version='[3.7,4)',org.hibernate.validator;version='[4.3,5)',org.hibernate.validator.constraints;version='[4.3,5)',org.slf4j;version='[1.7,2)'"
)
)
}
}

description = "AET :: API :: Communication API"
24 changes: 24 additions & 0 deletions api/datastorage-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
plugins {
id("com.cognifide.aet.java-conventions")
id("biz.aQute.bnd.builder")
}

dependencies {
projectCompile(project(":communication-api"))
compileOnly("com.google.guava:guava:25.1-jre")
compileOnly("javax.validation:validation-api:1.1.0.Final")
compileOnly("org.hibernate:hibernate-validator:4.3.2.Final")
compileOnly("org.jboss.logging:jboss-logging:3.3.2.Final")
compileOnly("com.google.code.gson:gson:2.8.5")
}

tasks.jar {
manifest {
attributes(
Pair("Bundle-Vendor", "Cognifide Ltd."),
Pair("Export-Package", "com.cognifide.aet.vs.*")
)
}
}

description = "AET :: API :: Data Storage API"
28 changes: 28 additions & 0 deletions api/jobs-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
plugins {
id("com.cognifide.aet.java-conventions")
id("biz.aQute.bnd.builder")
}

dependencies {
testImplementation("junit:junit:4.11")
projectCompile(project(":communication-api"))
projectCompile(project(":datastorage-api"))
projectCompile(project(":selenium"))
implementation("com.google.guava:guava:25.1-jre")
compileOnly("org.apache.commons:commons-lang3:3.7")
compileOnly("org.apache.httpcomponents:fluent-hc:4.5.5")
compileOnly("org.codehaus.jackson:jackson-mapper-asl:1.9.13")
}

tasks.jar {
manifest {
attributes(
Pair("Bundle-SymbolicName", project.name),
Pair("Bundle-Name", project.name),
Pair("Bundle-Vendor", "Cognifide Ltd."),
Pair("Export-Package", "com.cognifide.aet.job.api.*,org.browsermob.core.*")
)
}
}

description = "AET :: API :: Jobs API"
19 changes: 19 additions & 0 deletions api/validation-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
plugins {
id("com.cognifide.aet.java-conventions")
id("biz.aQute.bnd.builder")
}

dependencies {
compileOnly("org.apache.commons:commons-lang3:3.7")
}

tasks.jar {
manifest {
attributes(
Pair("Bundle-Vendor", "Cognifide Ltd."),
Pair("Export-Package", "com.cognifide.aet.validation")
)
}
}

description = "AET :: API :: Validation API"
89 changes: 89 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
plugins {
id("com.cognifide.aet.java-conventions")
id("org.nosphere.apache.rat") version "0.7.0"
}

defaultTasks(":zip:make")

tasks.rat {
// general
excludes.add("**/LICENSE")
excludes.add("**/NOTICE")
excludes.add(".travis.yml")
excludes.add("eclipse-java-google-style.xml")
excludes.add("intellij-java-google-style.xml")
excludes.add("**/*.md")
excludes.add("**/*.jar")
excludes.add("**/*.war")
excludes.add("**/*.zip")
excludes.add("**/*.json")
excludes.add("**/*.svg")

// Eclipse files
excludes.add("**/.project")
excludes.add("**/.classpath")

// IntelliJ files
excludes.add("**/.idea/**")
excludes.add("**/*.iml")

// mvn files
excludes.add("**/target/**")
excludes.add("**/pom.xml")

// gradle files
excludes.add("**/build/**")
excludes.add("**/*.gradle.kts")
excludes.add("**/*.gradle")
excludes.add("**/.gradle/**")
excludes.add("**/gradle.properties")
excludes.add("**/gradle-wrapper.properties")

// sample-site
excludes.add("**/integration-tests/sample-site/src/main/resources/mock/**/*.html")
excludes.add("**/integration-tests/sample-site/src/main/webapp/assets/demo_files/accessibility/bootstrap.css")
excludes.add("**/integration-tests/sample-site/src/main/webapp/assets/demo_files/bootstrap.css")
excludes.add("**/integration-tests/sample-site/src/main/webapp/assets/demo_files/bootstrap.min.js")
excludes.add("**/integration-tests/sample-site/src/main/webapp/assets/demo_files/bootswatch.min.css")
excludes.add("**/integration-tests/sample-site/src/main/webapp/assets/demo_files/combined.js")
excludes.add("**/integration-tests/sample-site/src/main/webapp/assets/demo_files/ie10-viewport-bug-workaround.js")
excludes.add("**/integration-tests/sample-site/src/main/webapp/assets/demo_files/jquery.min.js")
excludes.add("**/integration-tests/sample-site/src/main/webapp/assets/snippets/change-bg-snippet.js")
excludes.add("**/integration-tests/sample-site/src/main/webapp/assets/secured/change-bg-snippet.js")

// jobs
excludes.add("**/core/jobs/src/test/resources/mock/**/*.html")

// report
excludes.add("**/report/src/main/webapp/node/**")
excludes.add("**/report/src/main/webapp/.csslintrc")
excludes.add("**/report/src/main/webapp/.jsbeautifyrc")
excludes.add("**/report/src/main/webapp/.jshintrc")
excludes.add("**/report/src/main/webapp/.babelrc")
excludes.add("**/report/src/main/webapp/assets/libs/**")
excludes.add("**/report/src/main/webapp/assets/js/**")
excludes.add("**/report/src/test/jasmine/lib/**")
excludes.add("**/report/src/main/webapp/node_modules/**")
excludes.add("**/report/src/main/webapp/.sass-cache/**")
excludes.add("**/report/src/main/webapp/assets/fonts/**")
excludes.add("**/report/src/main/webapp/assets/img/**")
excludes.add("**/report/src/main/webapp/assets/icons/**")
excludes.add("**/report/src/main/webapp/assets/css/**")

// documentation
excludes.add("**/documentation/src/main/node/**")
excludes.add("**/documentation/src/main/node_modules/**")

// misc
excludes.add("**/misc/plugins-report.txt")
excludes.add("**/misc/dependencies-report.txt")
excludes.add("**/vagrant/.vagrant/**")
excludes.add("**/vagrant/Berksfile.lock")
excludes.add("**/vagrant/cookbooks/**")

// worker
excludes.add("**/core/worker/firefox/chrome.manifest")
}

tasks["rat"].outputs.upToDateWhen { false }
tasks["build"].dependsOn(tasks["rat"])
10 changes: 10 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
plugins {
// Support convention plugins written in Kotlin. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build.
`kotlin-dsl`
}

repositories {
// Use the plugin portal to apply community plugins in convention plugins.
gradlePluginPortal()
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
plugins {
`java-library`
`maven-publish`
}

repositories {
maven {
url = uri("http://repository.jboss.org/nexus/content/groups/public")
}
mavenCentral()
jcenter()
}

group = "com.cognifide.aet"
version = "3.4.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_1_8

publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}

tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}

val projectCompile by configurations.creating

sourceSets.main.get().compileClasspath += configurations["projectCompile"]
sourceSets.test.get().compileClasspath += configurations["projectCompile"]
sourceSets.test.get().runtimeClasspath += configurations["projectCompile"]
26 changes: 26 additions & 0 deletions client/aet-maven-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
plugins {
id("com.cognifide.aet.java-conventions")
}

dependencies {
projectCompile(project(":communication-api"))
projectCompile(project(":client-core"))
implementation("org.apache.maven:maven-plugin-api:2.0")
implementation("org.apache.maven:maven-project:2.2.1")
implementation("org.codehaus.plexus:plexus-utils:3.0.8")
implementation("com.google.guava:guava:23.6-jre")
implementation("org.apache.commons:commons-lang3:3.3.2")
implementation("commons-io:commons-io:2.4")
implementation("com.jcabi:jcabi-log:0.12.2")
implementation("org.slf4j:slf4j-api:1.7.10")
implementation("org.slf4j:slf4j-log4j12:1.7.10")
implementation("org.simpleframework:simple-xml:2.7.1")
implementation("javax.validation:validation-api:1.1.0.Final")
implementation("org.hibernate:hibernate-validator:4.3.2.Final")
testImplementation("junit:junit:4.11")
testImplementation("org.hamcrest:hamcrest-all:1.3")
testImplementation("org.mockito:mockito-all:1.9.5")
compileOnly("org.apache.maven.plugin-tools:maven-plugin-annotations:3.2")
}

description = "AET :: Client :: Maven Plugin"
23 changes: 23 additions & 0 deletions client/client-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
plugins {
id("com.cognifide.aet.java-conventions")
}

dependencies {
projectCompile(project(":communication-api"))
implementation("org.codehaus.plexus:plexus-utils:3.0.8")
implementation("com.google.guava:guava:23.6-jre")
implementation("org.apache.commons:commons-lang3:3.3.2")
implementation("org.apache.httpcomponents:fluent-hc:4.5.2")
implementation("org.apache.httpcomponents:httpmime:4.5.2")
implementation("commons-io:commons-io:2.4")
implementation("com.jcabi:jcabi-log:0.12.2")
implementation("org.slf4j:slf4j-api:1.7.10")
implementation("org.slf4j:slf4j-log4j12:1.7.10")
implementation("com.google.code.gson:gson:2.6.1")
implementation("org.simpleframework:simple-xml:2.7.1")
testImplementation("junit:junit:4.11")
testImplementation("org.hamcrest:hamcrest-all:1.3")
testImplementation("org.mockito:mockito-all:1.9.5")
}

description = "AET :: Client :: Client Core"
35 changes: 35 additions & 0 deletions core/accessibility-report/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
plugins {
id("com.cognifide.aet.java-conventions")
id("org.jetbrains.kotlin.jvm") version ("1.4.21-2")
id("biz.aQute.bnd.builder")
}

dependencies {
implementation("org.apache.poi:ooxml-schemas:1.4")
implementation("org.jetbrains:annotations:19.0.0")
projectCompile(project(":communication-api"))
projectCompile(project(":datastorage-api"))
compileOnly("org.osgi:org.osgi.service.component.annotations:1.3.0")
compileOnly("org.osgi:org.osgi.annotation:6.0.0")
compileOnly("org.osgi:org.osgi.service.metatype.annotations:1.3.0")
compileOnly("org.slf4j:slf4j-api:1.7.7")
compileOnly("org.mongodb:mongo-java-driver:3.8.0")
compileOnly("com.google.code.gson:gson:2.8.5")
compileOnly("commons-io:commons-io:2.6")
compileOnly("org.apache.commons:commons-text:1.8")
compileOnly("org.apache.commons:commons-collections4:4.4")
compileOnly("org.apache.poi:poi-ooxml:4.1.2")
compileOnly("org.jetbrains.kotlin:kotlin-osgi-bundle:1.3.72")
}

tasks.jar {
manifest {
attributes(
Pair("Bundle-Vendor", "Cognifide Ltd."),
Pair("Import-Package", "javax.annotation;resolution:=optional,*"),
Pair("Export-Package", "com.cognifide.aet.accessibility.report.service.*")
)
}
}

description = "AET :: Core :: Accessibility Report"
44 changes: 44 additions & 0 deletions core/cleaner/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins {
id("com.cognifide.aet.java-conventions")
id("biz.aQute.bnd.builder")
}

configurations {
testCompile {
extendsFrom(configurations.compileOnly.get())
}
}

dependencies {
testImplementation("junit:junit:4.11")
testImplementation("org.mockito:mockito-all:1.9.5")
testImplementation("org.hamcrest:hamcrest-all:1.3")
testImplementation("com.googlecode.zohhak:zohhak:1.1.1")
testImplementation("com.google.code.gson:gson:2.8.5")
projectCompile(project(":communication-api"))
projectCompile(project(":datastorage-api"))
projectCompile(project(":validation-api"))
projectCompile(project(":datastorage"))
projectCompile(project(":validation"))
compileOnly("org.osgi:org.osgi.service.component.annotations:1.3.0")
compileOnly("org.osgi:org.osgi.annotation:6.0.0")
compileOnly("org.osgi:org.osgi.service.metatype.annotations:1.3.0")
compileOnly("com.google.guava:guava:25.1-jre")
compileOnly("org.apache.commons:commons-lang3:3.7")
compileOnly("org.apache.activemq:activemq-osgi:5.15.2")
compileOnly("org.apache.servicemix.bundles:org.apache.servicemix.bundles.quartz:2.3.0_2")
compileOnly("org.apache.camel:camel-core:2.24.0")
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
}

tasks.jar {
manifest {
attributes(
Pair("Bundle-Vendor", "Cognifide Ltd."),
Pair("Import-Package", "javax.annotation;resolution:=optional,*"),
Pair("Export-Package", "com.cognifide.aet.cleaner.*")
)
}
}

description = "AET :: Core :: Cleaner"
Loading

0 comments on commit 29de8f2

Please sign in to comment.