-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(meta): get project to build and test
- Loading branch information
1 parent
b44aa16
commit c80e539
Showing
14 changed files
with
204 additions
and
119 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 |
---|---|---|
|
@@ -85,3 +85,4 @@ node_modules/ | |
|
||
*.iml | ||
/gradle.properties | ||
/.idea/ |
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,108 @@ | ||
import com.cognifide.gradle.aem.bundle.tasks.bundle | ||
|
||
plugins { | ||
java | ||
`maven-publish` | ||
alias(libs.plugins.gap.bundle) | ||
alias(libs.plugins.gap.pkg) | ||
alias(libs.plugins.nebula) | ||
alias(libs.plugins.quality) | ||
alias(libs.plugins.cpd) | ||
alias(libs.plugins.node) | ||
} | ||
|
||
group = "com.swisscom.aem.tools" | ||
|
||
defaultTasks("check") | ||
|
||
quality { | ||
checkstyleVersion = libs.versions.checkstyle.get() | ||
pmdVersion = libs.versions.pmd.get() | ||
spotbugsVersion = libs.versions.spotbugs.get() | ||
spotbugsEffort = "max" // min, less, more or max | ||
spotbugsLevel = "low" // low, medium, high | ||
} | ||
|
||
afterEvaluate { | ||
tasks.named("check") { | ||
dependsOn("checkQualityMain") | ||
} | ||
|
||
dependencies { | ||
add("spotbugsPlugins", libs.findsecbugs) | ||
add("spotbugsPlugins", libs.sbContrib) | ||
add("pmd", libs.pmd.ant) | ||
add("pmd", libs.pmd.java) | ||
|
||
// Spotbugs runtime annotations | ||
add("compileOnly", libs.spotbugs.annotations) | ||
} | ||
} | ||
|
||
tasks { | ||
withType<JavaCompile> { | ||
options.encoding = "UTF-8" | ||
options.compilerArgs.add("-Xlint:all") | ||
options.compilerArgs.add("-Xlint:-processing") | ||
options.compilerArgs.add("-Xlint:-serial") | ||
options.compilerArgs.add("-Werror") | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
javadoc { | ||
options.encoding = "UTF-8" | ||
} | ||
} | ||
|
||
java { | ||
afterEvaluate { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
dependencies { | ||
// Lombok | ||
annotationProcessor(libs.lombok) | ||
compileOnly(libs.lombok) | ||
|
||
// AEM | ||
compileOnly(libs.servlet) | ||
compileOnly(libs.gson) | ||
compileOnly(libs.apacheCommons.lang3) | ||
compileOnly(libs.osgi.cmpn) | ||
compileOnly(libs.jcr) | ||
compileOnly(libs.spiCommons) | ||
compileOnly(libs.sling.api) | ||
compileOnly(libs.sling.annotations) | ||
|
||
// Test framework | ||
testImplementation(libs.junit) | ||
testImplementation(libs.aemMock) | ||
} | ||
} | ||
|
||
node { | ||
version.set(libs.versions.node.get()) | ||
npmVersion.set(libs.versions.npm.get()) | ||
npmInstallCommand.set("ci") | ||
download.set(true) | ||
} | ||
|
||
aem { | ||
bundleEmbed(libs.apacheCommons.jexl, "org.apache.commons.jexl3.*", export = false) | ||
|
||
tasks { | ||
packageCompose { | ||
|
||
} | ||
|
||
withType<Jar> { | ||
bundle { | ||
javaPackage.set("${project.group}.jcrhopper") | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ dependencyResolutionManagement { | |
} | ||
} | ||
|
||
rootProject.name = "JCR Hopper" | ||
rootProject.name = "jcr-hopper" |
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
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
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
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
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.