Skip to content

Commit

Permalink
Major repackage
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian.panek committed May 23, 2019
1 parent ac84758 commit 902fe90
Show file tree
Hide file tree
Showing 169 changed files with 446 additions and 425 deletions.
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
### Project specific
.idea/
*.iml
*.ipr
classes/

### Linux template
*~

Expand Down Expand Up @@ -159,7 +153,7 @@ fabric.properties
.AppleDouble
.LSOverride

# Icon must end with two \r
# Icon must end with two /r
Icon


Expand Down Expand Up @@ -188,3 +182,10 @@ nbbuild/
dist/
nbdist/
.nb-gradle/

### Project specific
.idea/
*.iml
*.ipr
classes/
!src/main/kotlin/com/cognifide/gradle/aem/common/build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem

import org.gradle.api.DefaultTask
import org.gradle.api.Task
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem

import org.gradle.api.GradleException

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem

import com.cognifide.gradle.aem.bundle.BundlePlugin
import com.cognifide.gradle.aem.common.CommonPlugin
import com.cognifide.gradle.aem.common.build.*
import com.cognifide.gradle.aem.common.file.FileOperations
import com.cognifide.gradle.aem.common.file.FileWatcher
import com.cognifide.gradle.aem.common.file.resolver.ResolverOptions
import com.cognifide.gradle.aem.common.http.HttpClient
import com.cognifide.gradle.aem.common.instance.*
import com.cognifide.gradle.aem.common.notifier.NotifierFacade
import com.cognifide.gradle.aem.common.pkg.PackageDefinition
import com.cognifide.gradle.aem.common.pkg.PackageOptions
import com.cognifide.gradle.aem.common.pkg.vlt.VltFilter
import com.cognifide.gradle.aem.common.utils.Formats
import com.cognifide.gradle.aem.common.utils.LineSeparator
import com.cognifide.gradle.aem.common.utils.Patterns
import com.cognifide.gradle.aem.environment.Environment
import com.cognifide.gradle.aem.environment.EnvironmentPlugin
import com.cognifide.gradle.aem.instance.*
import com.cognifide.gradle.aem.pkg.PackageDefinition
import com.cognifide.gradle.aem.pkg.PackagePlugin
import com.cognifide.gradle.aem.pkg.tasks.PackageCompose
import com.cognifide.gradle.aem.pkg.vlt.VltFilter
import com.cognifide.gradle.aem.tooling.ToolingPlugin
import com.cognifide.gradle.aem.tooling.vlt.VltException
import com.fasterxml.jackson.annotation.JsonIgnore
Expand Down Expand Up @@ -176,17 +184,17 @@ class AemExtension(@JsonIgnore val project: Project) : Serializable {
/**
* Provides API for easier creation of tasks (e.g in sequence) in the matter of Gradle task configuration avoidance.
*/
val tasks = TaskFacade(this)
val tasks = AemTaskFacade(this)

fun tasks(configurer: TaskFacade.() -> Unit) {
fun tasks(configurer: AemTaskFacade.() -> Unit) {
tasks.apply(configurer)
}

/**
* Provides API for performing actions affecting multiple instances at once.
*/
@JsonIgnore
val actions = ActionPerformer(this)
val instanceActions = InstanceActionPerformer(this)

/**
* Collection of all java packages from all projects applying bundle plugin.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem

import com.fasterxml.jackson.databind.ObjectMapper
import java.io.Serializable
Expand All @@ -13,7 +13,7 @@ abstract class AemPlugin : Plugin<Project> {

abstract fun Project.configure()

protected fun Project.tasks(configurer: TaskFacade.() -> Unit) {
protected fun Project.tasks(configurer: AemTaskFacade.() -> Unit) {
return AemExtension.of(this).tasks(configurer)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem

import java.io.File
import org.gradle.api.Project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem

import com.cognifide.gradle.aem.bundle.BundleJar
import com.cognifide.gradle.aem.common.tasks.Debug
import com.cognifide.gradle.aem.common.tasks.TaskSequence
import com.cognifide.gradle.aem.common.tasks.lifecycle.*
import com.cognifide.gradle.aem.environment.tasks.*
import com.cognifide.gradle.aem.instance.satisfy.InstanceSatisfy
import com.cognifide.gradle.aem.instance.tail.InstanceTail
import com.cognifide.gradle.aem.instance.tasks.*
import com.cognifide.gradle.aem.pkg.tasks.*
import com.cognifide.gradle.aem.tooling.rcp.tasks.Rcp
import com.cognifide.gradle.aem.tooling.sync.tasks.Sync
import com.cognifide.gradle.aem.tooling.vlt.tasks.Vlt
import com.cognifide.gradle.aem.tooling.rcp.Rcp
import com.cognifide.gradle.aem.tooling.sync.Sync
import com.cognifide.gradle.aem.tooling.vlt.Vlt
import com.fasterxml.jackson.annotation.JsonIgnore
import java.io.Serializable
import org.gradle.api.Project
Expand All @@ -20,7 +23,7 @@ import org.gradle.api.tasks.bundling.Jar
import org.gradle.api.tasks.testing.Test

@Suppress("TooManyFunctions")
class TaskFacade(private val aem: AemExtension) : Serializable {
class AemTaskFacade(private val aem: AemExtension) : Serializable {

@JsonIgnore
val project = aem.project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.cognifide.gradle.aem.bundle

import com.cognifide.gradle.aem.common.AemException
import com.cognifide.gradle.aem.AemException

class BundleException : AemException {

Expand Down
10 changes: 5 additions & 5 deletions src/main/kotlin/com/cognifide/gradle/aem/bundle/BundleJar.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.cognifide.gradle.aem.bundle

import aQute.bnd.gradle.BundleTaskConvention
import com.cognifide.gradle.aem.common.AemException
import com.cognifide.gradle.aem.common.AemExtension
import com.cognifide.gradle.aem.common.DependencyOptions
import com.cognifide.gradle.aem.common.Formats
import com.cognifide.gradle.aem.instance.service.osgi.Bundle
import com.cognifide.gradle.aem.AemException
import com.cognifide.gradle.aem.AemExtension
import com.cognifide.gradle.aem.common.build.DependencyOptions
import com.cognifide.gradle.aem.common.instance.service.osgi.Bundle
import com.cognifide.gradle.aem.common.utils.Formats
import com.fasterxml.jackson.annotation.JsonIgnore
import java.io.File
import java.io.Serializable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.cognifide.gradle.aem.bundle

import com.cognifide.gradle.aem.common.AemExtension
import com.cognifide.gradle.aem.common.AemPlugin
import com.cognifide.gradle.aem.AemExtension
import com.cognifide.gradle.aem.AemPlugin
import com.cognifide.gradle.aem.pkg.PackagePlugin
import org.gradle.api.JavaVersion
import org.gradle.api.Project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.cognifide.gradle.aem.common

import com.cognifide.gradle.aem.AemExtension
import com.cognifide.gradle.aem.AemPlugin
import com.cognifide.gradle.aem.common.tasks.Debug
import com.cognifide.gradle.aem.common.tasks.Resolve
import java.util.*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem.common.build

object Behaviors {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem.common.build

import org.gradle.api.Project

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem.common.build

import org.gradle.api.logging.LogLevel
import org.gradle.api.logging.Logger
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem.common.build

import com.cognifide.gradle.aem.common.utils.Collections
import org.gradle.api.artifacts.ExternalModuleDependency
import org.gradle.api.artifacts.dsl.DependencyHandler

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem.common.build

import com.cognifide.gradle.aem.AemExtension
import kotlin.coroutines.CoroutineContext
import kotlinx.coroutines.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem.common.build

import com.cognifide.gradle.aem.common.utils.Formats
import org.gradle.api.Project

class ProgressCountdown(project: Project, private val value: Long) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem.common.build

import com.cognifide.gradle.aem.common.utils.Formats
import java.util.*
import kotlinx.coroutines.*
import org.gradle.api.Project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem.common.build

import java.util.*
import java.util.concurrent.TimeUnit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem.common.build

import com.cognifide.gradle.aem.AemException
import com.cognifide.gradle.aem.AemExtension
import com.cognifide.gradle.aem.common.utils.Formats
import com.mitchellbosecke.pebble.PebbleEngine
import com.mitchellbosecke.pebble.lexer.Syntax
import com.mitchellbosecke.pebble.loader.StringLoader
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package com.cognifide.gradle.aem.common
package com.cognifide.gradle.aem.common.build

import com.cognifide.gradle.aem.AemExtension
import com.cognifide.gradle.aem.common.utils.Formats

class Retry private constructor(val aem: AemExtension) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.cognifide.gradle.aem.common.file

import com.cognifide.gradle.aem.common.AemException
import com.cognifide.gradle.aem.AemException

class FileException : AemException {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.cognifide.gradle.aem.common.file

import com.cognifide.gradle.aem.common.AemPlugin
import com.cognifide.gradle.aem.common.Formats
import com.cognifide.gradle.aem.common.Patterns
import com.cognifide.gradle.aem.AemPlugin
import com.cognifide.gradle.aem.common.utils.Formats
import com.cognifide.gradle.aem.common.utils.Patterns
import java.io.File
import java.io.FileOutputStream
import java.io.InputStream
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.cognifide.gradle.aem.common.file

import com.cognifide.gradle.aem.common.AemException
import com.cognifide.gradle.aem.common.AemExtension
import com.cognifide.gradle.aem.common.Patterns
import com.cognifide.gradle.aem.AemException
import com.cognifide.gradle.aem.AemExtension
import com.cognifide.gradle.aem.common.utils.Patterns
import java.io.File
import org.apache.commons.io.monitor.FileAlterationListener
import org.apache.commons.io.monitor.FileAlterationMonitor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.cognifide.gradle.aem.common.file.downloader

import com.cognifide.gradle.aem.common.AemException
import com.cognifide.gradle.aem.common.AemExtension
import com.cognifide.gradle.aem.AemException
import com.cognifide.gradle.aem.AemExtension
import com.cognifide.gradle.aem.common.file.FileException
import com.cognifide.gradle.aem.common.http.HttpClient
import java.io.File
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.cognifide.gradle.aem.common.file.downloader

import com.cognifide.gradle.aem.common.Formats
import com.cognifide.gradle.aem.common.ProgressLogger
import com.cognifide.gradle.aem.common.build.ProgressLogger
import com.cognifide.gradle.aem.common.utils.Formats
import java.io.File
import java.io.FileOutputStream
import java.io.InputStream
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.cognifide.gradle.aem.common.file.downloader

import com.cognifide.gradle.aem.common.Patterns
import com.cognifide.gradle.aem.common.file.FileException
import com.cognifide.gradle.aem.common.utils.Patterns
import java.io.File
import java.io.IOException
import java.net.URL
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.cognifide.gradle.aem.common.file.resolver

import com.cognifide.gradle.aem.common.AemExtension
import com.cognifide.gradle.aem.AemExtension
import java.io.File

class FileResolver(aem: AemExtension, downloadDir: File) : Resolver<FileGroup>(aem, downloadDir) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.cognifide.gradle.aem.common.file.resolver

import com.cognifide.gradle.aem.common.AemExtension
import com.cognifide.gradle.aem.common.DependencyOptions
import com.cognifide.gradle.aem.common.Formats
import com.cognifide.gradle.aem.AemExtension
import com.cognifide.gradle.aem.common.build.DependencyOptions
import com.cognifide.gradle.aem.common.file.FileException
import com.cognifide.gradle.aem.common.file.downloader.HttpFileDownloader
import com.cognifide.gradle.aem.common.file.downloader.SftpFileDownloader
import com.cognifide.gradle.aem.common.file.downloader.SmbFileDownloader
import com.cognifide.gradle.aem.common.file.downloader.UrlFileDownloader
import com.cognifide.gradle.aem.common.http.HttpClient
import com.cognifide.gradle.aem.common.utils.Formats
import com.google.common.hash.HashCode
import java.io.File
import java.util.*
Expand All @@ -23,10 +23,10 @@ import org.gradle.util.GFileUtils
*/
abstract class Resolver<G : FileGroup>(
@get:Internal
val aem: AemExtension,
val aem: AemExtension,

@get:Internal
val downloadDir: File
val downloadDir: File
) {
private val project = aem.project

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.cognifide.gradle.aem.common.file.resolver

import com.cognifide.gradle.aem.common.AemExtension
import com.cognifide.gradle.aem.common.formats.JsonPassword
import com.cognifide.gradle.aem.AemExtension
import com.cognifide.gradle.aem.common.utils.formats.JsonPassword
import com.fasterxml.jackson.databind.annotation.JsonSerialize
import java.io.Serializable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.cognifide.gradle.aem.common.http

import com.cognifide.gradle.aem.common.AemException
import com.cognifide.gradle.aem.common.AemExtension
import com.cognifide.gradle.aem.common.Formats
import com.cognifide.gradle.aem.AemExtension
import com.cognifide.gradle.aem.common.file.downloader.HttpFileDownloader
import com.cognifide.gradle.aem.common.utils.Formats
import com.fasterxml.jackson.databind.ObjectMapper
import com.jayway.jsonpath.DocumentContext
import java.io.File
Expand Down Expand Up @@ -98,7 +97,7 @@ open class HttpClient(val aem: AemExtension) {
"patch" -> patch(uri, handler)
"head" -> head(uri, handler)
"delete" -> delete(uri, handler)
else -> throw AemException("Invalid HTTP client method: '$method'")
else -> throw RequestException("Invalid HTTP client method: '$method'")
}

fun get(uri: String) = get(uri) { checkStatus(it) }
Expand Down
Loading

0 comments on commit 902fe90

Please sign in to comment.