Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/improve buildscript #261

Merged
merged 3 commits into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Fixed
- #258 - Fixed actions which use @Flag annotation
- #258 - Fixed actions which use @Flag annotation

### Changed
- #260 - Updated GAP to the latest version. Fixed default task to deploy packages in proper order. Changed antlr and kotlin bundles to private packages
4 changes: 4 additions & 0 deletions app/aem/actions.checks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ dependencies {
}

tasks {
getByName("packageDeploy") {
mustRunAfter(":app:aem:ui.apps:packageDeploy")
}

register<Jar>("sourcesJar") {
from(sourceSets.main.get().allSource)
archiveClassifier.set("sources")
Expand Down
8 changes: 6 additions & 2 deletions app/aem/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.gradle.jvm.tasks.Jar
plugins {
id("com.cognifide.aem.bundle")
kotlin("jvm")
id("org.jetbrains.kotlin.plugin.noarg") version "1.3.70"
id("org.jetbrains.kotlin.plugin.noarg") version "1.3.72"
antlr
groovy
java
Expand Down Expand Up @@ -32,6 +32,10 @@ aem {
).joinToString(","))
attribute("Sling-Nodetypes", "CQ-INF/nodetypes/apm_nodetypes.cnd")
attribute("APM-Actions", "com.cognifide.apm.foundation.actions")
excludePackage("org.antlr.stringtemplate")
embedPackage("org.antlr:antlr4:4.7.2", "org.antlr.v4.*", "org.antlr.runtime.v4.*", "org.antlr.runtime.*", "org.stringtemplate.v4.*", "com.ibm.icu.*", "org.abego.treelayout.*")
embedPackage("org.jetbrains.kotlin:kotlin-reflect:1.3.72", "kotlin.reflect.*")
embedPackage("org.jetbrains.kotlin:kotlin-stdlib:1.3.72", "kotlin.*")
}
}
}
Expand All @@ -48,7 +52,7 @@ dependencies {
compileOnly("com.cognifide.cq.actions:com.cognifide.cq.actions.api:6.0.2")

compileOnly(kotlin("stdlib-jdk8"))
compileOnly(kotlin("osgi-bundle"))
compileOnly(kotlin("reflect"))
}

sourceSets {
Expand Down
7 changes: 6 additions & 1 deletion app/aem/ui.apps/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ apply(from = rootProject.file("app/aem/common.gradle.kts"))
aem {
tasks {
packageCompose {
installBundle("org.jetbrains.kotlin:kotlin-osgi-bundle:1.3.72")
installBundleProject(":app:aem:api")
installBundleProject(":app:aem:core")
installBundleProject(":app:aem:actions.main")
Expand All @@ -25,6 +24,12 @@ aem {
}
}

tasks {
getByName("packageDeploy") {
mustRunAfter(":env:instanceProvision")
}
}

publishing {
publications {
register<MavenPublication>("apmCrx") {
Expand Down
5 changes: 4 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
signing
}

defaultTasks("instanceSatisfy", ":app:aem:ui.apps:packageDeploy", ":app:aem:actions.checks:packageDeploy")
defaultTasks("deployAll")

scmVersion {
useHighestVersion = true
Expand All @@ -26,6 +26,9 @@ allprojects {
}

tasks {
register("deployAll") {
dependsOn(":env:instanceProvision", ":app:aem:ui.apps:packageDeploy", ":app:aem:actions.checks:packageDeploy")
}
withType<RatTask>().configureEach {
// Files that don't require a license header
excludes.add("**/LICENSE")
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72")
implementation("org.apache.sling:org.apache.sling.caconfig.bnd-plugin:1.0.2")
implementation("com.cognifide.gradle:environment-plugin:0.1.12")
implementation("com.cognifide.gradle:aem-plugin:13.2.1")
implementation("com.cognifide.gradle:aem-plugin:14.2.13")
}
6 changes: 2 additions & 4 deletions env/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ plugins {

aem {
instance {
satisfier {
packages {
"cq.actions"("https://github.com/Cognifide/APM/releases/download/apm-4.3.0/cq-actions-msg-replication-6.4.0.zip")
}
provisioner {
deployPackage("https://github.com/Cognifide/APM/releases/download/apm-4.3.0/cq-actions-msg-replication-6.4.0.zip")
}
}
}