diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..fb209b4
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/precompiled-binary-plugin-dependency.test.iml b/.idea/modules/precompiled-binary-plugin-dependency.test.iml
new file mode 100644
index 0000000..500474b
--- /dev/null
+++ b/.idea/modules/precompiled-binary-plugin-dependency.test.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/remote-versioned-modular-script-plugin-application.cucumberE2eTest.iml b/.idea/modules/remote-versioned-modular-script-plugin-application.cucumberE2eTest.iml
deleted file mode 100644
index 4a4ce55..0000000
--- a/.idea/modules/remote-versioned-modular-script-plugin-application.cucumberE2eTest.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules/remote-versioned-modular-script-plugin-application.iml b/.idea/modules/remote-versioned-modular-script-plugin-application.iml
deleted file mode 100644
index 4a4ce55..0000000
--- a/.idea/modules/remote-versioned-modular-script-plugin-application.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules/remote-versioned-modular-script-plugin-application.main.iml b/.idea/modules/remote-versioned-modular-script-plugin-application.main.iml
deleted file mode 100644
index 4a4ce55..0000000
--- a/.idea/modules/remote-versioned-modular-script-plugin-application.main.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules/remote-versioned-modular-script-plugin-library.iml b/.idea/modules/remote-versioned-modular-script-plugin-library.iml
deleted file mode 100644
index 4a4ce55..0000000
--- a/.idea/modules/remote-versioned-modular-script-plugin-library.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules/remote-versioned-modular-script-plugin-library.main.iml b/.idea/modules/remote-versioned-modular-script-plugin-library.main.iml
deleted file mode 100644
index 4a4ce55..0000000
--- a/.idea/modules/remote-versioned-modular-script-plugin-library.main.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules/simple-script-plugin.iml b/.idea/modules/simple-script-plugin.iml
deleted file mode 100644
index 4a4ce55..0000000
--- a/.idea/modules/simple-script-plugin.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/GradleLogo.png b/GradleLogo.png
new file mode 100755
index 0000000..8edfb9b
Binary files /dev/null and b/GradleLogo.png differ
diff --git a/README.md b/README.md
index 13ec106..1efda37 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,17 @@
-# Gradle Build Tool Example Projects
+# Gradle Plugin Development
-This repository contains examples of various Gradle features with the emphasis on Gradle plugins.
+This repository contains examples and assignments from Gradle Plugin Development Udemy course.
+
+
All examples are written using Groovy Gradle build scripts and additional code in Java 15. Projects were created with IntelliJ IDEA.
-Every project comes bundled with Gradle wrapper version 7.0 or 6.8.3.
+Every project comes bundled with Gradle wrapper version 7.0 or higher.
Below is the menu for easier navigation between sections. Every section contains multiple examples or assignments with the focus on a particular topic.
| Module | Description | External Link |
| ------------- |:-------------:| -------------:|
-| **[task](task/)** | This directory contains assignments and examples with the focus on Gradle tasks. | Task lecture |
-| **[script-plugin](script-plugin/)** | Script plugin is the easiest possible way of extracting tasks and any additional build logic from original build.gradle file. | Script plugin lecture |
-| **[precompiled-plugin](precompiled-plugin/)** | Going step further one can extract script plugin into precompiled plugin. | Precompiled plugin lecture |
-| **[binary-plugin](binary-plugin/)** | Not the fastest way to create a plugin, but it gives you the most options regarding extraction of the build logic and reusability. | Binary plugin lecture |
+| **[task](task/)** | This directory contains assignments and examples with the focus on Gradle tasks. The task is sorting files. Those tasks will be the base for plugin development. | Task lecture |
For any changes or additional content check [release notes](https://github.com/rivancic/gradle/releases).
diff --git a/precompiled-plugin/README.md b/precompiled-plugin/README.md
deleted file mode 100644
index 3747d7e..0000000
--- a/precompiled-plugin/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Gradle Precompiled Plugin
-
-This directory contains assignments and examples with the focus on precompiled Gradle plugins.
-
-Script or source code for the plugin has to go into **buildSrc** directory based on the Gradle convention.
-
-| Module | Description | Resources |
-| ------------- |:-------------:|-------------:|
-| **[precompiled-script-plugin](precompiled-script-plugin)** | Script plugin transformed into precompiled script plugin. This is supported with **groovy-gradle-plugin** plugin. This way plugin can be reused in multiple subprojects. Gradle components can be extracted into separate classes. | Precompiled script plugin resource |
-| **[precompiled-plugin](precompiled-plugin)** | Precompiled script plugin transformed into standard precompiled plugin. Now whole part of script plugin is extracted into standalone components. Code is structured as in a standard Java / Groovy / Kotlin application. | Precompiled plugin resource |
-
-**Precompiled plugin external resources**
-
-- [https://docs.gradle.org/current/samples/sample_convention_plugins.html](https://docs.gradle.org/current/samples/sample_convention_plugins.html)
-- [https://docs.gradle.org/current/userguide/custom_plugins.html](https://docs.gradle.org/current/userguide/custom_plugins.html)
-- [https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#organizing_gradle_projects](https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#organizing_gradle_projects)
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/.gitignore b/precompiled-plugin/precompiled-plugin/.gitignore
deleted file mode 100644
index 2677823..0000000
--- a/precompiled-plugin/precompiled-plugin/.gitignore
+++ /dev/null
@@ -1,152 +0,0 @@
-
-# Created by https://www.toptal.com/developers/gitignore/api/java,gradle,intellij
-# Edit at https://www.toptal.com/developers/gitignore?templates=java,gradle,intellij
-
-### Intellij ###
-# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
-# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
-
-# User-specific stuff
-.idea/**/workspace.xml
-.idea/**/tasks.xml
-.idea/**/usage.statistics.xml
-.idea/**/dictionaries
-.idea/**/shelf
-
-# Generated files
-.idea/**/contentModel.xml
-
-# Sensitive or high-churn files
-.idea/**/dataSources/
-.idea/**/dataSources.ids
-.idea/**/dataSources.local.xml
-.idea/**/sqlDataSources.xml
-.idea/**/dynamic.xml
-.idea/**/uiDesigner.xml
-.idea/**/dbnavigator.xml
-
-# Gradle
-.idea/**/gradle.xml
-.idea/**/libraries
-
-# Gradle and Maven with auto-import
-# When using Gradle or Maven with auto-import, you should exclude module files,
-# since they will be recreated, and may cause churn. Uncomment if using
-# auto-import.
-# .idea/artifacts
-# .idea/compiler.xml
-# .idea/jarRepositories.xml
-# .idea/modules.xml
-# .idea/*.iml
-# .idea/modules
-# *.iml
-# *.ipr
-
-# CMake
-cmake-build-*/
-
-# Mongo Explorer plugin
-.idea/**/mongoSettings.xml
-
-# File-based project format
-*.iws
-
-# IntelliJ
-out/
-
-# mpeltonen/sbt-idea plugin
-.idea_modules/
-
-# JIRA plugin
-atlassian-ide-plugin.xml
-
-# Cursive Clojure plugin
-.idea/replstate.xml
-
-# Crashlytics plugin (for Android Studio and IntelliJ)
-com_crashlytics_export_strings.xml
-crashlytics.properties
-crashlytics-build.properties
-fabric.properties
-
-# Editor-based Rest Client
-.idea/httpRequests
-
-# Android studio 3.1+ serialized cache file
-.idea/caches/build_file_checksums.ser
-
-### Intellij Patch ###
-# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
-
-# *.iml
-# modules.xml
-# .idea/misc.xml
-# *.ipr
-
-# Sonarlint plugin
-# https://plugins.jetbrains.com/plugin/7973-sonarlint
-.idea/**/sonarlint/
-
-# SonarQube Plugin
-# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
-.idea/**/sonarIssues.xml
-
-# Markdown Navigator plugin
-# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
-.idea/**/markdown-navigator.xml
-.idea/**/markdown-navigator-enh.xml
-.idea/**/markdown-navigator/
-
-# Cache file creation bug
-# See https://youtrack.jetbrains.com/issue/JBR-2257
-.idea/$CACHE_FILE$
-
-# CodeStream plugin
-# https://plugins.jetbrains.com/plugin/12206-codestream
-.idea/codestream.xml
-
-### Java ###
-# Compiled class file
-*.class
-
-# Log file
-*.log
-
-# BlueJ files
-*.ctxt
-
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
-
-# Package Files #
-*.jar
-*.war
-*.nar
-*.ear
-*.zip
-*.tar.gz
-*.rar
-
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
-
-### Gradle ###
-.gradle
-build/
-
-# Ignore Gradle GUI config
-gradle-app.setting
-
-# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
-!gradle-wrapper.jar
-
-# Cache of project
-.gradletasknamecache
-
-# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
-# gradle/wrapper/gradle-wrapper.properties
-
-### Gradle Patch ###
-**/build/
-
-# End of https://www.toptal.com/developers/gitignore/api/java,gradle,intellij
diff --git a/precompiled-plugin/precompiled-plugin/.idea/.gitignore b/precompiled-plugin/precompiled-plugin/.idea/.gitignore
deleted file mode 100644
index 73f69e0..0000000
--- a/precompiled-plugin/precompiled-plugin/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
-# Editor-based HTTP Client requests
-/httpRequests/
diff --git a/precompiled-plugin/precompiled-plugin/.idea/checkstyle-idea.xml b/precompiled-plugin/precompiled-plugin/.idea/checkstyle-idea.xml
deleted file mode 100644
index 3460331..0000000
--- a/precompiled-plugin/precompiled-plugin/.idea/checkstyle-idea.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/.idea/compiler.xml b/precompiled-plugin/precompiled-plugin/.idea/compiler.xml
deleted file mode 100644
index 443b5d2..0000000
--- a/precompiled-plugin/precompiled-plugin/.idea/compiler.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/.idea/misc.xml b/precompiled-plugin/precompiled-plugin/.idea/misc.xml
deleted file mode 100644
index 6915923..0000000
--- a/precompiled-plugin/precompiled-plugin/.idea/misc.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/.idea/modules/precompiled-script-plugin-structured.buildSrc.main.iml b/precompiled-plugin/precompiled-plugin/.idea/modules/precompiled-script-plugin-structured.buildSrc.main.iml
deleted file mode 100644
index 4a4ce55..0000000
--- a/precompiled-plugin/precompiled-plugin/.idea/modules/precompiled-script-plugin-structured.buildSrc.main.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/.idea/modules/precompiled-script-plugin-structured.iml b/precompiled-plugin/precompiled-plugin/.idea/modules/precompiled-script-plugin-structured.iml
deleted file mode 100644
index 4a4ce55..0000000
--- a/precompiled-plugin/precompiled-plugin/.idea/modules/precompiled-script-plugin-structured.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/.idea/vcs.xml b/precompiled-plugin/precompiled-plugin/.idea/vcs.xml
deleted file mode 100644
index b2bdec2..0000000
--- a/precompiled-plugin/precompiled-plugin/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/README.md b/precompiled-plugin/precompiled-plugin/README.md
deleted file mode 100644
index 2c7e6e6..0000000
--- a/precompiled-plugin/precompiled-plugin/README.md
+++ /dev/null
@@ -1,48 +0,0 @@
-# Precompiled Plugin
-
-In this module you will be able to see why precompiled plugin really offers you to express your build logic in a
-more structured way. With writing components of build logic inside standalone classes you will have more a feeling like you are writing
-usual Java application than some exotic scripting with DSL language. You could still try to extract tasks in script plugins
-but there is no such support as packaging and importing classes from the classpath.
-
-You can also easily debug logic inside your custom classes inside buildScr with IntelliJ IDEA support.
-
-In this project we will builds on top of [previous project](../precompiled-script-plugin) and extract tasks into standalone task classes. Also plugin will not be defined anymore in a groovy script file.
-We will create a Groovy class that extends Gradle API Plugin interface.
-
-Build logic is be written in Groovy language.
-
-## Code structure
-
-One of the main benefits of using precompiled plugin instead of script plugins is that you can better [structure build code in buildSrc directory.](https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#sec:build_sources)
-You will be able to structure code as in your ordinary JVM code. Code intended to be packaged in the plugin itself should be located under the **main** directory. Inside it packages can be used to structure the code.
-
-
-
-
-
-Tasks and plugins defined in the buildSrc will be available to all the build scripts inside the main project.
-
-Develop custom task.
-https://docs.gradle.org/current/userguide/custom_tasks.html
-
-## Components of the build script plugin
-
-### Project
-
-Applying module that is compiled in buildSrc and made available for all the projects
-
-### buildSrc
-
-buildSrc directory contains source code for the Gradle plugin. Content of this directory is automatically processed by
-the Gradle itself. Content of the buildSrc is the same as of any other Java based project.
-Source code should reside in src/main/[groovy/java/kotlin].
-Plugin is represented by the class extending the Plugin interface
-Content will be compiled and result persisted in internal build folder.
-
-### Plugin name
-
-// TODO show how to specify plugin name instead of using full package name of the class implementing the plugin.
-
-src/main/resources contains META-INF.gradle-plugins/{pluginName}.properties file that specifies short version of the plugin name.
-
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/build.gradle b/precompiled-plugin/precompiled-plugin/build.gradle
deleted file mode 100644
index 45f0165..0000000
--- a/precompiled-plugin/precompiled-plugin/build.gradle
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * TODO check if this description is included in precompiled-script-plugin
- * TODO Fix this description
- *
- * Name of the precompiled script plugin for which the source code resides in the buildSrc is defined by the
- * file name of the script itself. In case that the filename is precompiled-script-plugin-backup.gradle Then the
- * plugin id will be filename without the extension (.gradle).
- *
- *
- *
Filename: precompiled-script-plugin-backup.gradle
- *
Plugin id: precompiled-script-plugin
- *
- */
-plugins {
- id "filesPlugin"
-}
-
-// equals
-
-//apply plugin: "filesPlugin"
-
-// equals
-
-//apply plugin: com.rivancic.gradle.precompiled.FilesPlugin
diff --git a/precompiled-plugin/precompiled-plugin/buildSrc/src/main/groovy/com/rivancic/gradle/precompiled/FilesPlugin.groovy b/precompiled-plugin/precompiled-plugin/buildSrc/src/main/groovy/com/rivancic/gradle/precompiled/FilesPlugin.groovy
deleted file mode 100644
index 309a02e..0000000
--- a/precompiled-plugin/precompiled-plugin/buildSrc/src/main/groovy/com/rivancic/gradle/precompiled/FilesPlugin.groovy
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.rivancic.gradle.precompiled
-
-import com.rivancic.gradle.precompiled.tasks.CleanTask
-import com.rivancic.gradle.precompiled.tasks.SortFilesTask
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-
-/**
- * This build script contains two tasks. Main functionality is sorting files by their extension.
- *
- * Tasks are grouped into "files" group.
- *
- * Root folder containing files that have to be sorted is parametrized through Gradle properties with the key [tasks.files.folder].
- * Property has to be accessed through the project.ext map as direct reference doesn't work if property key is named with the dot notation.
- *
- * Second task clears build folder.
- */
-class FilesPlugin implements Plugin {
-
- @Override
- void apply(Project project) {
-
- project.tasks.register('sortFiles', SortFilesTask.class, {
- inputDir = project.file(project.properties.get("tasks.files.folder"))
- outputDir = project.layout.buildDirectory.dir('files').get().asFile
- })
-
- project.tasks.register('clean', CleanTask.class, {
- inputDir = project.layout.buildDirectory.asFile.get().exists() ? project.layout.buildDirectory : null
- })
- }
-}
diff --git a/precompiled-plugin/precompiled-plugin/buildSrc/src/main/groovy/com/rivancic/gradle/precompiled/tasks/CleanTask.groovy b/precompiled-plugin/precompiled-plugin/buildSrc/src/main/groovy/com/rivancic/gradle/precompiled/tasks/CleanTask.groovy
deleted file mode 100644
index 770a00b..0000000
--- a/precompiled-plugin/precompiled-plugin/buildSrc/src/main/groovy/com/rivancic/gradle/precompiled/tasks/CleanTask.groovy
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.rivancic.gradle.precompiled.tasks
-
-import org.gradle.api.DefaultTask
-import org.gradle.api.file.DirectoryProperty
-import org.gradle.api.tasks.CacheableTask
-import org.gradle.api.tasks.InputDirectory
-import org.gradle.api.tasks.PathSensitive
-import org.gradle.api.tasks.PathSensitivity
-import org.gradle.api.tasks.TaskAction
-import org.gradle.api.tasks.Optional
-
-import java.nio.file.Files
-import java.nio.file.Path
-
-/**
- *
- */
-@CacheableTask
-abstract class CleanTask extends DefaultTask {
-
- @PathSensitive(PathSensitivity.RELATIVE)
- @InputDirectory
- @Optional
- abstract DirectoryProperty getInputDir()
-
- CleanTask() {
- group = "files"
- description = "Deletes build folder"
- }
-
- @TaskAction
- def sort() {
- logger.info "==== Clean build ===="
- logger.info ""
-
- def filestodel = inputDir.getOrNull();
- if (filestodel != null) {
- try (def stream = Files.walk(filestodel.asFile.toPath())) {
- stream.sorted(Comparator.reverseOrder())
- .map(Path::toFile)
- .peek(file -> logger.info("File to del ${file.toString()}"))
- .map(File::delete).count()
- }
- }
-
- logger.info ""
- logger.info "======================="
- }
-}
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/buildSrc/src/main/groovy/com/rivancic/gradle/precompiled/tasks/FilesTask.groovy b/precompiled-plugin/precompiled-plugin/buildSrc/src/main/groovy/com/rivancic/gradle/precompiled/tasks/FilesTask.groovy
deleted file mode 100644
index a07c231..0000000
--- a/precompiled-plugin/precompiled-plugin/buildSrc/src/main/groovy/com/rivancic/gradle/precompiled/tasks/FilesTask.groovy
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.rivancic.gradle.precompiled.tasks
-
-import org.gradle.api.DefaultTask
-import org.gradle.api.tasks.CacheableTask
-import org.gradle.api.tasks.InputDirectory
-import org.gradle.api.file.DirectoryProperty
-import org.gradle.api.tasks.OutputDirectory
-import org.gradle.api.tasks.PathSensitive
-import org.gradle.api.tasks.PathSensitivity
-
-/**
- * TODO show all the obstacles to make a task cachable
- *
- * Annotate with CacheableTask
- *
- * @InputDirectory -> has to have normalization strategy https://docs.gradle.org/7.0/userguide/validation_problems.html#missing_normalization_annotation
- */
-@CacheableTask
-abstract class FilesTask extends DefaultTask {
- @PathSensitive(PathSensitivity.RELATIVE)
- @InputDirectory
- abstract DirectoryProperty getInputDir()
-
- @OutputDirectory
- abstract DirectoryProperty getOutputDir()
-
- FilesTask() {
- group = "files"
- }
-
- /**
- * Get file extension from its file name
- *
- * @param filename from which extension will be extracted
- * @return extension of the file
- */
- static String getExtensionOf(String filename) {
- return filename.substring(filename.lastIndexOf(".") + 1)
- }
-}
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/buildSrc/src/main/groovy/com/rivancic/gradle/precompiled/tasks/SortFilesTask.groovy b/precompiled-plugin/precompiled-plugin/buildSrc/src/main/groovy/com/rivancic/gradle/precompiled/tasks/SortFilesTask.groovy
deleted file mode 100644
index 901e19e..0000000
--- a/precompiled-plugin/precompiled-plugin/buildSrc/src/main/groovy/com/rivancic/gradle/precompiled/tasks/SortFilesTask.groovy
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.rivancic.gradle.precompiled.tasks
-
-import org.gradle.api.tasks.CacheableTask
-import org.gradle.api.tasks.TaskAction
-
-import java.nio.file.Files
-import java.nio.file.StandardCopyOption
-
-/**
- * This method sorts files inside specific directory.
- *
- *
- *
- * Files to be sorted are taken from FilesTask#inputDir
- *
- *
- * Result is being stored in FilesTask#outputDir
- *
- *
- *
- * This task can be configuration cached as its not referring to the Project instance.
- *
- * Only none hidden files are taken into consideration.
- *
- * For every extension new subdirectory is created and file with that extension is moved to matching subdirectory.
- */
-@CacheableTask
-abstract class SortFilesTask extends FilesTask {
-
- SortFilesTask() {
- description = "Sorts files in given directory into subdirectories based on their file extensions"
- }
-
- @TaskAction
- def sort() {
- logger.info "==== Sorting Files ===="
- logger.info ""
-
- inputDir.get().asFile
- .listFiles({ file -> file.isFile() && !file.isHidden() } as FileFilter)
- .each {
-
- // Extract name and extension of the file
- def fileName = it.getName()
- def extension = getExtensionOf fileName
-
- // Create dir of that extension
- Files.createDirectories(outputDir.get().asFile.toPath().resolve(extension))
-
- // Move file to that directory
- Files.copy(
- it.toPath(),
- outputDir.get().asFile.toPath().resolve("$extension/$fileName"),
- StandardCopyOption.REPLACE_EXISTING)
- }
-
- logger.info ""
- logger.info "======================="
- }
-}
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/buildSrc/src/main/resources/META-INF/gradle-plugins/filesPlugin.properties b/precompiled-plugin/precompiled-plugin/buildSrc/src/main/resources/META-INF/gradle-plugins/filesPlugin.properties
deleted file mode 100644
index 76d1165..0000000
--- a/precompiled-plugin/precompiled-plugin/buildSrc/src/main/resources/META-INF/gradle-plugins/filesPlugin.properties
+++ /dev/null
@@ -1 +0,0 @@
-implementation-class=com.rivancic.gradle.precompiled.FilesPlugin
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/gradle.properties b/precompiled-plugin/precompiled-plugin/gradle.properties
deleted file mode 100644
index 190e78f..0000000
--- a/precompiled-plugin/precompiled-plugin/gradle.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-tasks.files.folder=files
-
-# TODO what does this one do?
-# https://docs.gradle.org/current/userguide/build_cache.html
-# Not only does it check if the result of the task is the same as it was before. But for example even if we call clean task that removes the output, it can based on the input files get the cached files in the output and places them there
-# Or if the output is not the same as the chached one then its replaced with the output matching input from the cache.
-#org.gradle.caching=true
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/gradle/wrapper/gradle-wrapper.jar b/precompiled-plugin/precompiled-plugin/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index e708b1c..0000000
Binary files a/precompiled-plugin/precompiled-plugin/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/precompiled-plugin/precompiled-plugin/gradle/wrapper/gradle-wrapper.properties b/precompiled-plugin/precompiled-plugin/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 938f0c1..0000000
--- a/precompiled-plugin/precompiled-plugin/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStorePath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
diff --git a/precompiled-plugin/precompiled-plugin/gradlew b/precompiled-plugin/precompiled-plugin/gradlew
deleted file mode 100755
index 4f906e0..0000000
--- a/precompiled-plugin/precompiled-plugin/gradlew
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/env sh
-
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=`expr $i + 1`
- done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-exec "$JAVACMD" "$@"
diff --git a/precompiled-plugin/precompiled-plugin/gradlew.bat b/precompiled-plugin/precompiled-plugin/gradlew.bat
deleted file mode 100644
index 107acd3..0000000
--- a/precompiled-plugin/precompiled-plugin/gradlew.bat
+++ /dev/null
@@ -1,89 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/precompiled-plugin/precompiled-plugin/readme-content/gradle-precompiled-plugin.png b/precompiled-plugin/precompiled-plugin/readme-content/gradle-precompiled-plugin.png
deleted file mode 100644
index f0b72f4..0000000
Binary files a/precompiled-plugin/precompiled-plugin/readme-content/gradle-precompiled-plugin.png and /dev/null differ
diff --git a/precompiled-plugin/precompiled-plugin/settings.gradle b/precompiled-plugin/precompiled-plugin/settings.gradle
deleted file mode 100644
index 42bde28..0000000
--- a/precompiled-plugin/precompiled-plugin/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name='precompiled-plugin'
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-script-plugin/.gitignore b/precompiled-plugin/precompiled-script-plugin/.gitignore
deleted file mode 100644
index 2677823..0000000
--- a/precompiled-plugin/precompiled-script-plugin/.gitignore
+++ /dev/null
@@ -1,152 +0,0 @@
-
-# Created by https://www.toptal.com/developers/gitignore/api/java,gradle,intellij
-# Edit at https://www.toptal.com/developers/gitignore?templates=java,gradle,intellij
-
-### Intellij ###
-# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
-# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
-
-# User-specific stuff
-.idea/**/workspace.xml
-.idea/**/tasks.xml
-.idea/**/usage.statistics.xml
-.idea/**/dictionaries
-.idea/**/shelf
-
-# Generated files
-.idea/**/contentModel.xml
-
-# Sensitive or high-churn files
-.idea/**/dataSources/
-.idea/**/dataSources.ids
-.idea/**/dataSources.local.xml
-.idea/**/sqlDataSources.xml
-.idea/**/dynamic.xml
-.idea/**/uiDesigner.xml
-.idea/**/dbnavigator.xml
-
-# Gradle
-.idea/**/gradle.xml
-.idea/**/libraries
-
-# Gradle and Maven with auto-import
-# When using Gradle or Maven with auto-import, you should exclude module files,
-# since they will be recreated, and may cause churn. Uncomment if using
-# auto-import.
-# .idea/artifacts
-# .idea/compiler.xml
-# .idea/jarRepositories.xml
-# .idea/modules.xml
-# .idea/*.iml
-# .idea/modules
-# *.iml
-# *.ipr
-
-# CMake
-cmake-build-*/
-
-# Mongo Explorer plugin
-.idea/**/mongoSettings.xml
-
-# File-based project format
-*.iws
-
-# IntelliJ
-out/
-
-# mpeltonen/sbt-idea plugin
-.idea_modules/
-
-# JIRA plugin
-atlassian-ide-plugin.xml
-
-# Cursive Clojure plugin
-.idea/replstate.xml
-
-# Crashlytics plugin (for Android Studio and IntelliJ)
-com_crashlytics_export_strings.xml
-crashlytics.properties
-crashlytics-build.properties
-fabric.properties
-
-# Editor-based Rest Client
-.idea/httpRequests
-
-# Android studio 3.1+ serialized cache file
-.idea/caches/build_file_checksums.ser
-
-### Intellij Patch ###
-# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
-
-# *.iml
-# modules.xml
-# .idea/misc.xml
-# *.ipr
-
-# Sonarlint plugin
-# https://plugins.jetbrains.com/plugin/7973-sonarlint
-.idea/**/sonarlint/
-
-# SonarQube Plugin
-# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
-.idea/**/sonarIssues.xml
-
-# Markdown Navigator plugin
-# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
-.idea/**/markdown-navigator.xml
-.idea/**/markdown-navigator-enh.xml
-.idea/**/markdown-navigator/
-
-# Cache file creation bug
-# See https://youtrack.jetbrains.com/issue/JBR-2257
-.idea/$CACHE_FILE$
-
-# CodeStream plugin
-# https://plugins.jetbrains.com/plugin/12206-codestream
-.idea/codestream.xml
-
-### Java ###
-# Compiled class file
-*.class
-
-# Log file
-*.log
-
-# BlueJ files
-*.ctxt
-
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
-
-# Package Files #
-*.jar
-*.war
-*.nar
-*.ear
-*.zip
-*.tar.gz
-*.rar
-
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
-
-### Gradle ###
-.gradle
-build/
-
-# Ignore Gradle GUI config
-gradle-app.setting
-
-# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
-!gradle-wrapper.jar
-
-# Cache of project
-.gradletasknamecache
-
-# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
-# gradle/wrapper/gradle-wrapper.properties
-
-### Gradle Patch ###
-**/build/
-
-# End of https://www.toptal.com/developers/gitignore/api/java,gradle,intellij
diff --git a/precompiled-plugin/precompiled-script-plugin/.idea/.gitignore b/precompiled-plugin/precompiled-script-plugin/.idea/.gitignore
deleted file mode 100644
index 73f69e0..0000000
--- a/precompiled-plugin/precompiled-script-plugin/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
-# Editor-based HTTP Client requests
-/httpRequests/
diff --git a/precompiled-plugin/precompiled-script-plugin/.idea/checkstyle-idea.xml b/precompiled-plugin/precompiled-script-plugin/.idea/checkstyle-idea.xml
deleted file mode 100644
index 3460331..0000000
--- a/precompiled-plugin/precompiled-script-plugin/.idea/checkstyle-idea.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-script-plugin/.idea/compiler.xml b/precompiled-plugin/precompiled-script-plugin/.idea/compiler.xml
deleted file mode 100644
index 443b5d2..0000000
--- a/precompiled-plugin/precompiled-script-plugin/.idea/compiler.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-script-plugin/.idea/misc.xml b/precompiled-plugin/precompiled-script-plugin/.idea/misc.xml
deleted file mode 100644
index 6915923..0000000
--- a/precompiled-plugin/precompiled-script-plugin/.idea/misc.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-script-plugin/.idea/vcs.xml b/precompiled-plugin/precompiled-script-plugin/.idea/vcs.xml
deleted file mode 100644
index b2bdec2..0000000
--- a/precompiled-plugin/precompiled-script-plugin/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-script-plugin/README.md b/precompiled-plugin/precompiled-script-plugin/README.md
deleted file mode 100644
index 06dba7c..0000000
--- a/precompiled-plugin/precompiled-script-plugin/README.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# Precompiled Script Plugin
-
-Till now all the build logic was contained in the build script. Precompiled script plugin allows you to package whole
-build script written in DSL language as in Groovy or Kotlin to package it as a plugin from buildSrc directory.
-It will be compiled into class files and packaged into a jar. For all intents and purposes, they are binary plugins and
-can be applied by plugin ID, tested and published as binary plugins.
-
-The benefit you will now receive is that build logic can be extracted step by step in stand-alone classes inside the
-buildSrc directory. In the same way new build logic can be added. This can be an intermediate step at rewriting script logic into
-precompiled or stand-alone binary plugin.
-
-In this project we will build on top of [previous simple script plugin](../../script-plugin/simple-script-plugin) We will transfer build
-logic into separate module. Plugin will still be defined in a script file. To create an actual plugin out of build script under buildSrc we
-have to add [groovy-gradle-plugin](https://plugins.gradle.org/plugin/dev.gradleplugins.groovy-gradle-plugin) to buildSrc itself.
-
-## Code structure
-
-Script for the plugin has to be located under `buildScr/main/groovy` or `buildSrc/main/kotlin` package.
-The name of the plugin by which you will be able to reference it will be the same as the filename of the script itself
-without the extension. In case that the filename is **precompiled-script-plugin.gradle** Then the
-plugin id will be filename without the extension **.gradle**.
-
-- Filename: precompiled-script-plugin.gradle
-- Plugin id: precompiled-script-plugin
-
-
-
-
-
-Gradle script defined in buildSrc will be available to all the build scripts inside the main project as a plugin.
-
-## Components of the build script plugin
-
-### Project
-
-Project itself is applying plugin that is compiled in buildSrc from the script and made available for all the projects.
-
-### buildSrc
-
-Containing Gradle script that will be compiled as a plugin. This will be done with the help of groovy-gradle-plugin.
-Content will be compiled and result persisted in internal build folder as a buildSrc.jar.
-
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-script-plugin/build.gradle b/precompiled-plugin/precompiled-script-plugin/build.gradle
deleted file mode 100644
index c0a7b20..0000000
--- a/precompiled-plugin/precompiled-script-plugin/build.gradle
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * Name of the precompiled script plugin for which the source code resides in the buildSrc is defined by the
- * file name of the script itself. In case that the filename is precompiled-script-plugin.gradle Then the
- * plugin id will be filename without the extension (.gradle).
- *
- *
- *
Filename: precompiled-script-plugin.gradle
- *
Plugin id: precompiled-script-plugin
- *
- */
-plugins {
- id 'precompiled-script-plugin'
-}
diff --git a/precompiled-plugin/precompiled-script-plugin/buildSrc/build.gradle b/precompiled-plugin/precompiled-script-plugin/buildSrc/build.gradle
deleted file mode 100644
index caeafaa..0000000
--- a/precompiled-plugin/precompiled-script-plugin/buildSrc/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * In order that the precompiled plugin is discovered in other projects groovy-gradle-plugin has to be
- * applied in buildSrc itself.
- *
- * This is the place where any additional plugins and configuration can be applied that will be required to
- * compile a Gradle plugin.
- */
-plugins {
- id 'groovy-gradle-plugin'
-}
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-script-plugin/buildSrc/src/main/groovy/precompiled-script-plugin.gradle b/precompiled-plugin/precompiled-script-plugin/buildSrc/src/main/groovy/precompiled-script-plugin.gradle
deleted file mode 100644
index 0844d16..0000000
--- a/precompiled-plugin/precompiled-script-plugin/buildSrc/src/main/groovy/precompiled-script-plugin.gradle
+++ /dev/null
@@ -1,107 +0,0 @@
-import java.nio.file.Files
-import java.nio.file.StandardCopyOption
-import java.nio.file.Paths
-
-/**
- * This build script contains two tasks. Main functionality is sorting files by their extension.
- *
- * Tasks are grouped into "files" group.
- *
- * Root folder containing files that have to be sorted is parametrized through Gradle properties with the key [tasks.files.folder].
- * Property has to be accessed through the project.ext map as direct reference doesn't work if property key is named with the dot notation.
- */
-
-/**
- * This method sorts files inside specific directory. It does that in the source directory directly and doesn't use
- * build directory. Files are being sorted based on their extension.
- *
- * Files are being resolved with the Project#file() method, as this way we get correct path to the relative path.
- * Only none hidden files are taken into consideration.
- *
- * For every extension new subdirectory is created and file with that extension is moved to matching subdirectory.
- */
-tasks.register('sortFiles') {
- group="files"
- description="Sorts files in given directory into subdirectories based on their file extensions"
-
- doLast { // action that will be executed
- logger.info "==== Sorting Files ===="
- logger.info ""
-
- // Show this in the example
- // https://stackoverflow.com/questions/37101589/how-to-read-a-properties-files-and-use-the-values-in-project-gradle-script
-
- file(project.ext['tasks.files.folder'])
- .listFiles({ file -> file.isFile() && !file.isHidden() } as FileFilter)
- .each {
-
- // Extract name and extension of the file
- def fileName = it.getName()
- def extension = getExtensionOf fileName
-
- // Create dir of that extension
- mkdir "files/" + extension + "/"
-
- // Move file to that directory
- Files.move(it.toPath(), Paths.get(files("files/" + extension + "/" + fileName).asPath), StandardCopyOption.REPLACE_EXISTING)
- }
-
- logger.info ""
- logger.info "======================="
- }
-}
-
-/**
- * Is un-sorting the files, which does exactly the opposite of the sortFiles task. It grabs all the files in subdirectories and
- * moves them tot he root directory. Subdirectories are deleted.
- */
-task unSortFiles {
- group="files"
- description="Reverts sorting of files; moves all files back to root of the given directory"
-
- doLast {
- logger.info "==== Un-Sorting Files ===="
- logger.info ""
-
- def rootFile = file(project.ext['tasks.files.folder'])
- unSortRecursively(rootFile, rootFile.toPath())
-
- logger.info ""
- logger.info "======================="
- }
-}
-
-/**
- * It recursively walks through directories moves files to the root directory and deletes subdirectories.
- * @param directory current directory to be un-sorted
- * @param rootDirectory where the files should be moved
- */
-void unSortRecursively(File directory, java.nio.file.Path rootDirectory) {
- directory.listFiles().each {
-
- // If its file move it back to root directory
- if (it.isFile() && !it.isHidden()) {
- Files.move(it.toPath(), Paths.get(rootDirectory.toString(), it.getName()), StandardCopyOption.REPLACE_EXISTING)
- }
-
- // Remove directories
- if (it.isDirectory()) {
-
- // Go through it
- unSortRecursively it, rootDirectory
-
- // Remove it
- it.delete()
- }
- }
-}
-
-/**
- * Get file extension from its file name
- *
- * @param filename from which extension will be extracted
- * @return extension of the file
- */
-static String getExtensionOf(String filename) {
- return filename.substring(filename.lastIndexOf(".") + 1)
-}
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-script-plugin/files/business.jpg b/precompiled-plugin/precompiled-script-plugin/files/business.jpg
deleted file mode 100644
index f917733..0000000
Binary files a/precompiled-plugin/precompiled-script-plugin/files/business.jpg and /dev/null differ
diff --git a/precompiled-plugin/precompiled-script-plugin/files/scanner.wav b/precompiled-plugin/precompiled-script-plugin/files/scanner.wav
deleted file mode 100644
index f6faf81..0000000
Binary files a/precompiled-plugin/precompiled-script-plugin/files/scanner.wav and /dev/null differ
diff --git a/precompiled-plugin/precompiled-script-plugin/files/stock.jpg b/precompiled-plugin/precompiled-script-plugin/files/stock.jpg
deleted file mode 100644
index dee521a..0000000
Binary files a/precompiled-plugin/precompiled-script-plugin/files/stock.jpg and /dev/null differ
diff --git a/precompiled-plugin/precompiled-script-plugin/gradle.properties b/precompiled-plugin/precompiled-script-plugin/gradle.properties
deleted file mode 100644
index ed9db98..0000000
--- a/precompiled-plugin/precompiled-script-plugin/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-tasks.files.folder=files
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-script-plugin/gradle/wrapper/gradle-wrapper.jar b/precompiled-plugin/precompiled-script-plugin/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index e708b1c..0000000
Binary files a/precompiled-plugin/precompiled-script-plugin/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/precompiled-plugin/precompiled-script-plugin/gradle/wrapper/gradle-wrapper.properties b/precompiled-plugin/precompiled-script-plugin/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 938f0c1..0000000
--- a/precompiled-plugin/precompiled-script-plugin/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStorePath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
diff --git a/precompiled-plugin/precompiled-script-plugin/gradlew b/precompiled-plugin/precompiled-script-plugin/gradlew
deleted file mode 100755
index 4f906e0..0000000
--- a/precompiled-plugin/precompiled-script-plugin/gradlew
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/env sh
-
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=`expr $i + 1`
- done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-exec "$JAVACMD" "$@"
diff --git a/precompiled-plugin/precompiled-script-plugin/gradlew.bat b/precompiled-plugin/precompiled-script-plugin/gradlew.bat
deleted file mode 100644
index 107acd3..0000000
--- a/precompiled-plugin/precompiled-script-plugin/gradlew.bat
+++ /dev/null
@@ -1,89 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/precompiled-plugin/precompiled-script-plugin/readme-content/gradle-precompiled-script-plugin.png b/precompiled-plugin/precompiled-script-plugin/readme-content/gradle-precompiled-script-plugin.png
deleted file mode 100644
index b50a267..0000000
Binary files a/precompiled-plugin/precompiled-script-plugin/readme-content/gradle-precompiled-script-plugin.png and /dev/null differ
diff --git a/precompiled-plugin/precompiled-script-plugin/settings.gradle b/precompiled-plugin/precompiled-script-plugin/settings.gradle
deleted file mode 100644
index ff0774b..0000000
--- a/precompiled-plugin/precompiled-script-plugin/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name='precompiled-script-plugin'
\ No newline at end of file
diff --git a/script-plugin/README.md b/script-plugin/README.md
deleted file mode 100644
index e4902bb..0000000
--- a/script-plugin/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Gradle Script Plugin
-
-This directory contains assignments and examples with the focus on Gradle script plugins.
-
-| Module | Description | Resources |
-| ------------- |:-------------:|-------------:|
-| **[simple-script-plugin](simple-script-plugin)** | Simplest way of **decoupling** build logic into multiple gradle script files. | Simple script plugin |
-| **[remote-script-plugin](remote-script-plugin)** | Script plugin is being fetched from remote location. | Remote script plugin |
-| **[remote-versioned-script-plugin](remote-versioned-script-plugin)** | Script plugin is being fetched from remote versioned repository. One can define the version of plugin being applied. | Remote versioned script plugin |
-| **Modularity** | When your build script or script plugin starts to aggregate tasks and configurations with different responsibilities its time to split them up for easier maintenance and re-usability. Below you will see two different projects applying a sub group of script plugins. Only the ones are applied that are needed for a particular build. | Remote versioned modular script plugin |
-| **[remote-versioned-modular-script-plugin-library](remote-versioned-modular-script-plugin-library)** | Contains plain Java library example that is applying remote script plugin assembled out of multiple plugins that are covering:
compilation
unit testing
| |
-| **[remote-versioned-modular-script-plugin-application](remote-versioned-modular-script-plugin-application)** | Contains Spring Boot application example that is applying remote script plugin assembled out of multiple plugins that are covering:
compilation
unit testing
integration testing
frameworks
| |
-
diff --git a/script-plugin/debugTest/.gitignore b/script-plugin/debugTest/.gitignore
deleted file mode 100644
index 2677823..0000000
--- a/script-plugin/debugTest/.gitignore
+++ /dev/null
@@ -1,152 +0,0 @@
-
-# Created by https://www.toptal.com/developers/gitignore/api/java,gradle,intellij
-# Edit at https://www.toptal.com/developers/gitignore?templates=java,gradle,intellij
-
-### Intellij ###
-# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
-# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
-
-# User-specific stuff
-.idea/**/workspace.xml
-.idea/**/tasks.xml
-.idea/**/usage.statistics.xml
-.idea/**/dictionaries
-.idea/**/shelf
-
-# Generated files
-.idea/**/contentModel.xml
-
-# Sensitive or high-churn files
-.idea/**/dataSources/
-.idea/**/dataSources.ids
-.idea/**/dataSources.local.xml
-.idea/**/sqlDataSources.xml
-.idea/**/dynamic.xml
-.idea/**/uiDesigner.xml
-.idea/**/dbnavigator.xml
-
-# Gradle
-.idea/**/gradle.xml
-.idea/**/libraries
-
-# Gradle and Maven with auto-import
-# When using Gradle or Maven with auto-import, you should exclude module files,
-# since they will be recreated, and may cause churn. Uncomment if using
-# auto-import.
-# .idea/artifacts
-# .idea/compiler.xml
-# .idea/jarRepositories.xml
-# .idea/modules.xml
-# .idea/*.iml
-# .idea/modules
-# *.iml
-# *.ipr
-
-# CMake
-cmake-build-*/
-
-# Mongo Explorer plugin
-.idea/**/mongoSettings.xml
-
-# File-based project format
-*.iws
-
-# IntelliJ
-out/
-
-# mpeltonen/sbt-idea plugin
-.idea_modules/
-
-# JIRA plugin
-atlassian-ide-plugin.xml
-
-# Cursive Clojure plugin
-.idea/replstate.xml
-
-# Crashlytics plugin (for Android Studio and IntelliJ)
-com_crashlytics_export_strings.xml
-crashlytics.properties
-crashlytics-build.properties
-fabric.properties
-
-# Editor-based Rest Client
-.idea/httpRequests
-
-# Android studio 3.1+ serialized cache file
-.idea/caches/build_file_checksums.ser
-
-### Intellij Patch ###
-# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
-
-# *.iml
-# modules.xml
-# .idea/misc.xml
-# *.ipr
-
-# Sonarlint plugin
-# https://plugins.jetbrains.com/plugin/7973-sonarlint
-.idea/**/sonarlint/
-
-# SonarQube Plugin
-# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
-.idea/**/sonarIssues.xml
-
-# Markdown Navigator plugin
-# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
-.idea/**/markdown-navigator.xml
-.idea/**/markdown-navigator-enh.xml
-.idea/**/markdown-navigator/
-
-# Cache file creation bug
-# See https://youtrack.jetbrains.com/issue/JBR-2257
-.idea/$CACHE_FILE$
-
-# CodeStream plugin
-# https://plugins.jetbrains.com/plugin/12206-codestream
-.idea/codestream.xml
-
-### Java ###
-# Compiled class file
-*.class
-
-# Log file
-*.log
-
-# BlueJ files
-*.ctxt
-
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
-
-# Package Files #
-*.jar
-*.war
-*.nar
-*.ear
-*.zip
-*.tar.gz
-*.rar
-
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
-
-### Gradle ###
-.gradle
-build/
-
-# Ignore Gradle GUI config
-gradle-app.setting
-
-# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
-!gradle-wrapper.jar
-
-# Cache of project
-.gradletasknamecache
-
-# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
-# gradle/wrapper/gradle-wrapper.properties
-
-### Gradle Patch ###
-**/build/
-
-# End of https://www.toptal.com/developers/gitignore/api/java,gradle,intellij
diff --git a/script-plugin/debugTest/build.gradle.kts b/script-plugin/debugTest/build.gradle.kts
deleted file mode 100644
index 887f08c..0000000
--- a/script-plugin/debugTest/build.gradle.kts
+++ /dev/null
@@ -1,5 +0,0 @@
-tasks.register("mainTask1") {
- doLast {
- println("Main task 1")
- }
-}
\ No newline at end of file
diff --git a/script-plugin/debugTest/debugTest.gradle b/script-plugin/debugTest/debugTest.gradle
deleted file mode 100644
index a5e866c..0000000
--- a/script-plugin/debugTest/debugTest.gradle
+++ /dev/null
@@ -1,5 +0,0 @@
-tasks.register("mainTask") {
- doLast {
- println("Main task")
- }
-}
\ No newline at end of file
diff --git a/script-plugin/debugTest/files/jpg/business.jpg b/script-plugin/debugTest/files/jpg/business.jpg
deleted file mode 100644
index f917733..0000000
Binary files a/script-plugin/debugTest/files/jpg/business.jpg and /dev/null differ
diff --git a/script-plugin/debugTest/files/jpg/stock.jpg b/script-plugin/debugTest/files/jpg/stock.jpg
deleted file mode 100644
index dee521a..0000000
Binary files a/script-plugin/debugTest/files/jpg/stock.jpg and /dev/null differ
diff --git a/script-plugin/debugTest/files/wav/scanner.wav b/script-plugin/debugTest/files/wav/scanner.wav
deleted file mode 100644
index f6faf81..0000000
Binary files a/script-plugin/debugTest/files/wav/scanner.wav and /dev/null differ
diff --git a/script-plugin/debugTest/gradle.properties b/script-plugin/debugTest/gradle.properties
deleted file mode 100644
index ed9db98..0000000
--- a/script-plugin/debugTest/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-tasks.files.folder=files
\ No newline at end of file
diff --git a/script-plugin/debugTest/gradle/wrapper/gradle-wrapper.jar b/script-plugin/debugTest/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index e708b1c..0000000
Binary files a/script-plugin/debugTest/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/script-plugin/debugTest/gradle/wrapper/gradle-wrapper.properties b/script-plugin/debugTest/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 7c31d2d..0000000
--- a/script-plugin/debugTest/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Sun Feb 07 15:12:59 CET 2021
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStorePath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
diff --git a/script-plugin/debugTest/gradlew b/script-plugin/debugTest/gradlew
deleted file mode 100755
index 4f906e0..0000000
--- a/script-plugin/debugTest/gradlew
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/env sh
-
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=`expr $i + 1`
- done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-exec "$JAVACMD" "$@"
diff --git a/script-plugin/debugTest/gradlew.bat b/script-plugin/debugTest/gradlew.bat
deleted file mode 100644
index 107acd3..0000000
--- a/script-plugin/debugTest/gradlew.bat
+++ /dev/null
@@ -1,89 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/script-plugin/debugTest/scriptPlugin.gradle b/script-plugin/debugTest/scriptPlugin.gradle
deleted file mode 100644
index 743094d..0000000
--- a/script-plugin/debugTest/scriptPlugin.gradle
+++ /dev/null
@@ -1,5 +0,0 @@
-task scriptPluginTask {
- doLast {
- println("Script plugin task")
- }
-}
\ No newline at end of file
diff --git a/script-plugin/debugTest/settings.gradle b/script-plugin/debugTest/settings.gradle
deleted file mode 100644
index e69de29..0000000
diff --git a/script-plugin/remote-script-plugin/enterprise-java-plugin.gradle b/script-plugin/remote-script-plugin/enterprise-java-plugin.gradle
deleted file mode 100644
index 2fbc992..0000000
--- a/script-plugin/remote-script-plugin/enterprise-java-plugin.gradle
+++ /dev/null
@@ -1,7 +0,0 @@
-def baseUrl = 'https://raw.githubusercontent.com/rivancic/gradle/remote-script-plugin/remote-script%3Dplugin/'
-
-apply from: "${baseUrl}plugin-modules/java-setup-plugin.gradle"
-apply from: "${baseUrl}plugin-modules/junit-test-plugin.gradle"
-apply from: "${baseUrl}plugin-modules/integration-testing-plugin.gradle"
-apply from: "${baseUrl}plugin-modules/sonarqube-plugin.gradle"
-apply from: "${baseUrl}plugin-modules/deployment-plugin.gradle"
\ No newline at end of file
diff --git a/script-plugin/remote-script-plugin/local-java-development-plugin.gradle b/script-plugin/remote-script-plugin/local-java-development-plugin.gradle
deleted file mode 100644
index 032f520..0000000
--- a/script-plugin/remote-script-plugin/local-java-development-plugin.gradle
+++ /dev/null
@@ -1,4 +0,0 @@
-def baseUrl = 'https://raw.githubusercontent.com/rivancic/gradle/remote-script-plugin/remote-script%3Dplugin/'
-
-apply from: "${baseUrl}plugin-modules/java-setup-plugin.gradle"
-apply from: "${baseUrl}plugin-modules/junit-test-plugin.gradle"
\ No newline at end of file
diff --git a/script-plugin/remote-script-plugin/plugin-modules/deployment-plugin.gradle b/script-plugin/remote-script-plugin/plugin-modules/deployment-plugin.gradle
deleted file mode 100644
index 7cb6030..0000000
--- a/script-plugin/remote-script-plugin/plugin-modules/deployment-plugin.gradle
+++ /dev/null
@@ -1,8 +0,0 @@
-task deployApplication {
-
- description "Functionality for deploying packaged java project to production environment"
-
- doLast {
- logger.info("Your java project has been deployed to production")
- }
-}
\ No newline at end of file
diff --git a/script-plugin/remote-script-plugin/plugin-modules/integration-testing-plugin.gradle b/script-plugin/remote-script-plugin/plugin-modules/integration-testing-plugin.gradle
deleted file mode 100644
index 5969f60..0000000
--- a/script-plugin/remote-script-plugin/plugin-modules/integration-testing-plugin.gradle
+++ /dev/null
@@ -1,9 +0,0 @@
-task integrationTest {
-
- description "Functionality for integration testing the Java project"
-
- doLast {
- logger.info("Integration tests running...")
- logger.info("Integration tests passed")
- }
-}
\ No newline at end of file
diff --git a/script-plugin/remote-script-plugin/plugin-modules/java-setup-plugin.gradle b/script-plugin/remote-script-plugin/plugin-modules/java-setup-plugin.gradle
deleted file mode 100644
index c0eec48..0000000
--- a/script-plugin/remote-script-plugin/plugin-modules/java-setup-plugin.gradle
+++ /dev/null
@@ -1,8 +0,0 @@
-task javaBuild {
-
- description "Setting up java project"
-
- doLast {
- logger.info("Basic java project setup")
- }
-}
\ No newline at end of file
diff --git a/script-plugin/remote-script-plugin/plugin-modules/junit-test-plugin.gradle b/script-plugin/remote-script-plugin/plugin-modules/junit-test-plugin.gradle
deleted file mode 100644
index eb3fa7b..0000000
--- a/script-plugin/remote-script-plugin/plugin-modules/junit-test-plugin.gradle
+++ /dev/null
@@ -1,8 +0,0 @@
-task JUnitTest {
-
- description "Running JUnit tests"
-
- doLast {
- logger.info("JUnit tests running")
- }
-}
\ No newline at end of file
diff --git a/script-plugin/remote-script-plugin/plugin-modules/sonarqube-plugin.gradle b/script-plugin/remote-script-plugin/plugin-modules/sonarqube-plugin.gradle
deleted file mode 100644
index 75b3f46..0000000
--- a/script-plugin/remote-script-plugin/plugin-modules/sonarqube-plugin.gradle
+++ /dev/null
@@ -1,9 +0,0 @@
-task sonarQubeCheck {
-
- description "Scan project with SonarQube"
-
- doLast {
- logger.info("Running SonarQube check")
- logger.info("SonarQube check passed")
- }
-}
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/.gitignore b/script-plugin/remote-versioned-modular-script-plugin-application/.gitignore
deleted file mode 100644
index 63d2f1a..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/.gitignore
+++ /dev/null
@@ -1,36 +0,0 @@
-.gradle
-build/
-!gradle/wrapper/gradle-wrapper.jar
-!**/src/main/**/build/
-!**/src/test/**/build/
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-bin/
-!**/src/main/**/bin/
-!**/src/test/**/bin/
-
-### IntelliJ IDEA ###
-.idea
-*.iws
-*.iml
-*.ipr
-out/
-!**/src/main/**/out/
-!**/src/test/**/out/
-
-### NetBeans ###
-/nbproject/private/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
-
-### VS Code ###
-.vscode/
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/README.md b/script-plugin/remote-versioned-modular-script-plugin-application/README.md
deleted file mode 100644
index 355f66b..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/README.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Gradle Versioned Modular Remote Script Plugin Example
-
-This project contains a Spring Boot application that applies versioned modular remote script plugin.
-
-Applied script plugin contains multiple script plugins itself. It acts like a container for other modular plugins.
-
-To check out plugin source code look at the following repository https://github.com/rivancic/gradle-versioned-modular-script-plugin/tree/main
-
-With applying following plugin in one line
-
-`apply from: 'https://raw.githubusercontent.com/rivancic/gradle-versioned-modular-script-plugin/v1.0/spring-application-plugin.gradle'`
-
-the build script will have out of the box support for:
-- Compiling Java
-- Spring Boot application support
-- Unit tests
-- Cucumber + Selenium tests
-
-You can execute all those stages with running `gradle build`
-
-In case you use `-i` option at building the project you can see in logs how the script plugins are applied at
-Gradle project configuration phase:
-
-```
-Configure project :
-...
-Cached resource https://raw.githubusercontent.com/rivancic/gradle-versioned-modular-script-plugin/v1.0/spring-application-plugin.gradle
-Cached resource https://raw.githubusercontent.com/rivancic/gradle-versioned-modular-script-plugin/v1.0/java-plugin.gradle is up-to-date
-Cached resource https://raw.githubusercontent.com/rivancic/gradle-versioned-modular-script-plugin/v1.0/spring-boot-plugin.gradle
-Cached resource https://raw.githubusercontent.com/rivancic/gradle-versioned-modular-script-plugin/v1.0/unit-test-plugin.gradle is up-to-date
-Cached resource https://raw.githubusercontent.com/rivancic/gradle-versioned-modular-script-plugin/v1.0/cucumber-e2e-test-plugin.gradle
-```
-
-Diagram that show how build.gradle applies remote versioned modular script plugin and how this one includes
-other standalone plugins.
-
-
-
-
-## Application functionality
-
-This is a tiny Spring Boot project that uses Thymeleaf as rendering engine.
-Unit tests are written in Junit5.
-E2E tests are using Cucumber + Selenium.
-
-The application tells you which script languages are supported by different build tools.
-When running the application it loads all available build tools and displays them in the list.
-After user selects build tool available languages for writing build scripts will be shown.
-
-After application is started it will be available under http://localhost:8080/.
-
-1) One can select build tool
-
-
-
-
-2) Available languages for buildscripts are shown
-
-
-
-
-Requirements:
-- Application compilation -> Java15
-- Executing E2E tests -> Chrome Webdriver path specified under [webdriver.chrome.driver]. Check [application.properties](src/cucumberE2eTest/resources/application.properties)
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/build.gradle b/script-plugin/remote-versioned-modular-script-plugin-application/build.gradle
deleted file mode 100644
index 507fb85..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/build.gradle
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Apply script plugin that contains all the tasks to build:
- * - Java
- * - Spring Boot
- * - JUnit Tests
- * _ E2E Tests Cucumber + Selenium
- *
- * Note that a specific version of the plugin should be provided
- */
-apply from: "https://raw.githubusercontent.com/rivancic/gradle-versioned-modular-script-plugin/${property('spring-application-plugin.version')}/spring-application-plugin.gradle"
-
-group = 'com.rivancic'
-version = '0.0.1-SNAPSHOT'
-
-
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/gradle.properties b/script-plugin/remote-versioned-modular-script-plugin-application/gradle.properties
deleted file mode 100644
index 6a15ec9..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/gradle.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-cucumbere2etests.packagename=com.rivancic.gradle
-spring-application-plugin.version=v1.0
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/gradle/wrapper/gradle-wrapper.jar b/script-plugin/remote-versioned-modular-script-plugin-application/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index e708b1c..0000000
Binary files a/script-plugin/remote-versioned-modular-script-plugin-application/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/gradle/wrapper/gradle-wrapper.properties b/script-plugin/remote-versioned-modular-script-plugin-application/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 3c4101c..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/gradlew b/script-plugin/remote-versioned-modular-script-plugin-application/gradlew
deleted file mode 100755
index 4f906e0..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/gradlew
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/env sh
-
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=`expr $i + 1`
- done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-exec "$JAVACMD" "$@"
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/gradlew.bat b/script-plugin/remote-versioned-modular-script-plugin-application/gradlew.bat
deleted file mode 100644
index 107acd3..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/gradlew.bat
+++ /dev/null
@@ -1,89 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/readme-content/modular-selected-build-tool.png b/script-plugin/remote-versioned-modular-script-plugin-application/readme-content/modular-selected-build-tool.png
deleted file mode 100644
index 22fa56b..0000000
Binary files a/script-plugin/remote-versioned-modular-script-plugin-application/readme-content/modular-selected-build-tool.png and /dev/null differ
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/readme-content/modular-tool-selection-open.png b/script-plugin/remote-versioned-modular-script-plugin-application/readme-content/modular-tool-selection-open.png
deleted file mode 100644
index 301f68e..0000000
Binary files a/script-plugin/remote-versioned-modular-script-plugin-application/readme-content/modular-tool-selection-open.png and /dev/null differ
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/readme-content/modular-tool-selection.png b/script-plugin/remote-versioned-modular-script-plugin-application/readme-content/modular-tool-selection.png
deleted file mode 100644
index 0a69235..0000000
Binary files a/script-plugin/remote-versioned-modular-script-plugin-application/readme-content/modular-tool-selection.png and /dev/null differ
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/readme-content/remote-versioned-modular-plugin-application.png b/script-plugin/remote-versioned-modular-script-plugin-application/readme-content/remote-versioned-modular-plugin-application.png
deleted file mode 100644
index 6f335ee..0000000
Binary files a/script-plugin/remote-versioned-modular-script-plugin-application/readme-content/remote-versioned-modular-plugin-application.png and /dev/null differ
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/settings.gradle b/script-plugin/remote-versioned-modular-script-plugin-application/settings.gradle
deleted file mode 100644
index 50075fa..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = 'remote-versioned-modular-script-plugin-application'
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/java/com/rivancic/gradle/BuildToolIntegrationTest.java b/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/java/com/rivancic/gradle/BuildToolIntegrationTest.java
deleted file mode 100644
index 3b1da50..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/java/com/rivancic/gradle/BuildToolIntegrationTest.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.rivancic.gradle;
-
-import io.cucumber.junit.platform.engine.Cucumber;
-
-@Cucumber
-public class BuildToolIntegrationTest {
-}
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/java/com/rivancic/gradle/BuildToolSpringIntegrationTest.java b/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/java/com/rivancic/gradle/BuildToolSpringIntegrationTest.java
deleted file mode 100644
index dc68062..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/java/com/rivancic/gradle/BuildToolSpringIntegrationTest.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.rivancic.gradle;
-
-import io.cucumber.spring.CucumberContextConfiguration;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.web.server.LocalServerPort;
-
-@CucumberContextConfiguration
-@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT)
-@AutoConfigureMockMvc
-public class BuildToolSpringIntegrationTest {
-
- @LocalServerPort
- protected int port;
-}
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/java/com/rivancic/gradle/BuildToolStepdefs.java b/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/java/com/rivancic/gradle/BuildToolStepdefs.java
deleted file mode 100644
index e155aee..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/java/com/rivancic/gradle/BuildToolStepdefs.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.rivancic.gradle;
-
-import io.cucumber.java.en.Given;
-import io.cucumber.java.en.Then;
-import io.cucumber.java.en.When;
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.chrome.ChromeDriver;
-
-public class BuildToolStepdefs extends BuildToolSpringIntegrationTest {
-
- WebDriver driver;
-
- @Given("application is started")
- public void application_starts() {
- driver = new ChromeDriver();
- String url = "http://localhost:" + port + "/";
- driver.get(url);
- }
-
- @When("{word} build tool is selected")
- public void build_tool_is_selected(String buildTool) {
- driver.findElement(By.xpath("//option[@value='"+buildTool+"']")).click();
- driver.findElement(By.xpath("//input[@value='Select']")).click();
- }
-
- @Then("{string} as script language is available")
- public void check_which_script_languages_are_available(String availableScripLanguages) {
- String displayedText = driver.findElement(By.xpath("//p")).getText();
- displayedText.endsWith(availableScripLanguages);
- driver.close();
- }
-}
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/resources/application.properties b/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/resources/application.properties
deleted file mode 100644
index 96f6420..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/resources/application.properties
+++ /dev/null
@@ -1 +0,0 @@
-webdriver.chrome.driver=/usr/local/bin/chromedriver
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/resources/features/BuiltToolSelection.feature b/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/resources/features/BuiltToolSelection.feature
deleted file mode 100644
index f3df545..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/cucumberE2eTest/resources/features/BuiltToolSelection.feature
+++ /dev/null
@@ -1,11 +0,0 @@
-Feature: Selecting build tool on landing page shows compatible script languages
-
- Scenario: Select Maven build tool
- Given application is started
- When Maven build tool is selected
- Then 'XML' as script language is available
-
- Scenario: Select Gradle build tool
- Given application is started
- When Gradle build tool is selected
- Then 'Groovy, Kotlin' as script language is available
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/BuildTool.java b/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/BuildTool.java
deleted file mode 100644
index 72a6b5d..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/BuildTool.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.rivancic.gradle;
-
-import java.util.List;
-
-public class BuildTool {
- private String name;
- private List scriptLanguages;
-
- public BuildTool(String name, List scriptLanguages) {
- this.name = name;
- this.scriptLanguages = scriptLanguages;
- }
-
-
- public String getName() {
- return name;
- }
-
- public List getScriptLanguages() {
- return scriptLanguages;
- }
-}
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/BuildToolController.java b/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/BuildToolController.java
deleted file mode 100644
index f579d9d..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/BuildToolController.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.rivancic.gradle;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.ModelMap;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.servlet.ModelAndView;
-
-@Controller
-public class BuildToolController {
-
- final BuildToolsService buildToolsService;
-
- public BuildToolController(@Autowired BuildToolsService buildToolsService) {
- this.buildToolsService = buildToolsService;
- }
-
- @GetMapping("/")
- public ModelAndView redirectWithUsingForwardPrefix() {
- return new ModelAndView("forward:/buildtool");
- }
-
- @GetMapping("/buildtool")
- public String buildTool(ModelMap model) {
- model.put("buildTools", new BuildToolLandingDTO(buildToolsService.getAll()));
- return "buildtool";
- }
-
- @PostMapping("/buildtool")
- public String buildToolPost(@ModelAttribute BuildToolLandingDTO buildToolLandingDTO, ModelMap model) {
- System.out.println("Build tool is " + buildToolLandingDTO.getSelectedBuildTool());
- buildToolLandingDTO.setSelectedBuildToolModel(buildToolsService.get(buildToolLandingDTO.getSelectedBuildTool()));
- model.put("buildTools", buildToolLandingDTO);
- return "buildtool";
- }
-}
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/BuildToolLandingDTO.java b/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/BuildToolLandingDTO.java
deleted file mode 100644
index 61af1be..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/BuildToolLandingDTO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.rivancic.gradle;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-
-public class BuildToolLandingDTO {
-
- private List buildToolList;
- private String selectedBuildTool = null;
- private BuildTool selectedBuildToolModel;
-
- public String getBuildScriptLanguagesAsText() {
- return selectedBuildToolModel.getScriptLanguages().stream().collect(Collectors.joining(", "));
- }
-
- public BuildToolLandingDTO() {
- this.buildToolList = Collections.emptyList();
- }
-
- public BuildToolLandingDTO(List buildToolList) {
- this.buildToolList = buildToolList;
- }
-
- public BuildTool getSelectedBuildToolModel() {
- return selectedBuildToolModel;
- }
-
- public void setSelectedBuildToolModel(BuildTool selectedBuildToolModel) {
- this.selectedBuildToolModel = selectedBuildToolModel;
- }
-
- public List getBuildToolList() {
- return buildToolList;
- }
-
- public void setBuildToolList(List buildToolList) {
- this.buildToolList = buildToolList;
- }
-
- public String getSelectedBuildTool() {
- return selectedBuildTool;
- }
-
- public void setSelectedBuildTool(String selectedBuildTool) {
- this.selectedBuildTool = selectedBuildTool;
- }
-}
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/BuildToolsService.java b/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/BuildToolsService.java
deleted file mode 100644
index 72dfda4..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/BuildToolsService.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.rivancic.gradle;
-
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-@Service
-public class BuildToolsService {
-
- List buildTools = new ArrayList<>();
-
- public BuildToolsService() {
- BuildTool mavenBuildTool = new BuildTool("Maven", Arrays.asList("XML"));
- BuildTool gradleBuildTool = new BuildTool("Gradle", Arrays.asList("Groovy", "Kotlin"));
- buildTools.add(mavenBuildTool);
- buildTools.add(gradleBuildTool);
- }
-
- public List getAll() {
- return buildTools;
- }
-
- public BuildTool get(String selectedBuildTool) {
- return buildTools.stream()
- .filter(tool -> tool.getName().equals(selectedBuildTool))
- .findFirst()
- .orElseThrow(() -> new IllegalArgumentException("Nonexisting build tool"));
- }
-}
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/RemoteVersionedModularScriptPluginApplication.java b/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/RemoteVersionedModularScriptPluginApplication.java
deleted file mode 100644
index 1f13ac8..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/java/com/rivancic/gradle/RemoteVersionedModularScriptPluginApplication.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.rivancic.gradle;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class RemoteVersionedModularScriptPluginApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(RemoteVersionedModularScriptPluginApplication.class, args);
- }
-
-}
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/resources/application.properties b/script-plugin/remote-versioned-modular-script-plugin-application/src/main/resources/application.properties
deleted file mode 100644
index 8b13789..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/resources/application.properties
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/resources/templates/buildtool.html b/script-plugin/remote-versioned-modular-script-plugin-application/src/main/resources/templates/buildtool.html
deleted file mode 100644
index 67063d4..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/main/resources/templates/buildtool.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
- Developing Remote Versioned Modular Gradle Script Plugin
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/test/java/com/rivancic/gradle/BuildToolServiceTest.java b/script-plugin/remote-versioned-modular-script-plugin-application/src/test/java/com/rivancic/gradle/BuildToolServiceTest.java
deleted file mode 100644
index 20f29ef..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/test/java/com/rivancic/gradle/BuildToolServiceTest.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.rivancic.gradle;
-
-import org.assertj.core.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-import java.util.List;
-
-public class BuildToolServiceTest {
-
- @Test
- void whenGetAllBuildTools_thenReturnAllOfThem() {
- BuildToolsService cut = new BuildToolsService();
- List allBuildTools = cut.getAll();
- Assertions.assertThat(allBuildTools).hasSize(2);
- Assertions.assertThat(allBuildTools.get(0).getName()).isEqualTo("Maven");
- Assertions.assertThat(allBuildTools.get(0).getScriptLanguages()).hasSize(1);
- Assertions.assertThat(allBuildTools.get(0).getScriptLanguages()).contains("XML");
- Assertions.assertThat(allBuildTools.get(1).getName()).isEqualTo("Gradle");
- Assertions.assertThat(allBuildTools.get(1).getScriptLanguages()).hasSize(2);
- Assertions.assertThat(allBuildTools.get(1).getScriptLanguages()).contains("Groovy", "Kotlin");
- }
-}
diff --git a/script-plugin/remote-versioned-modular-script-plugin-application/src/test/java/com/rivancic/gradle/RemoteVersionedModularScriptPluginApplicationTests.java b/script-plugin/remote-versioned-modular-script-plugin-application/src/test/java/com/rivancic/gradle/RemoteVersionedModularScriptPluginApplicationTests.java
deleted file mode 100644
index 57a6a8a..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-application/src/test/java/com/rivancic/gradle/RemoteVersionedModularScriptPluginApplicationTests.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.rivancic.gradle;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-@SpringBootTest
-class RemoteVersionedModularScriptPluginApplicationTests {
-
- @Test
- void contextLoads() {
- }
-
-}
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/.gitignore b/script-plugin/remote-versioned-modular-script-plugin-library/.gitignore
deleted file mode 100644
index 63d2f1a..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-library/.gitignore
+++ /dev/null
@@ -1,36 +0,0 @@
-.gradle
-build/
-!gradle/wrapper/gradle-wrapper.jar
-!**/src/main/**/build/
-!**/src/test/**/build/
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-bin/
-!**/src/main/**/bin/
-!**/src/test/**/bin/
-
-### IntelliJ IDEA ###
-.idea
-*.iws
-*.iml
-*.ipr
-out/
-!**/src/main/**/out/
-!**/src/test/**/out/
-
-### NetBeans ###
-/nbproject/private/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
-
-### VS Code ###
-.vscode/
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/README.md b/script-plugin/remote-versioned-modular-script-plugin-library/README.md
deleted file mode 100644
index 71eb76b..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-library/README.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Gradle Versioned Modular Remote Script Plugin Example
-
-This project contains a Java library that applies versioned modular remote script plugin.
-
-Applied script plugin contains multiple script plugins itself. It acts like a container for other modular plugins.
-
-To check out plugin source code look at the following repository https://github.com/rivancic/gradle-versioned-modular-script-plugin/tree/main
-
-With applying following plugin in one line
-
-`apply from: 'https://raw.githubusercontent.com/rivancic/gradle-versioned-modular-script-plugin/v1.0/java-library-plugin.gradle'`
-
-the build script will have out of the box support for:
-- Compiling Java
-- Unit tests
-
-You can execute all those stages with running `gradle build`
-
-In case you use `-i` option at building the project you can see in logs how the script plugins are applied at
-Gradle project configuration phase:
-
-```
-Configure project :
-...
-Cached resource https://raw.githubusercontent.com/rivancic/gradle-versioned-modular-script-plugin/v1.0/java-library-plugin.gradle
-Cached resource https://raw.githubusercontent.com/rivancic/gradle-versioned-modular-script-plugin/v1.0/java-plugin.gradle is up-to-date
-Cached resource https://raw.githubusercontent.com/rivancic/gradle-versioned-modular-script-plugin/v1.0/unit-test-plugin.gradle is up-to-date
-```
-
-Diagram that show how build.gradle applies remote versioned modular script plugin and how this one includes
-other standalone plugins.
-
-
-
-
-## Library functionality
-
-This library provides you the basic information about Java build tools. One can list all of them or select a specific one.
-Build tool model contains a list of languages supported for a build script.
-
-Main class of this Java library is BuildToolsService. It has two methods:
-- `List getAll()` which returns a list of BuildTool instance which represents the actual build tool (Maven, Gradle or sbt)
-- `BuildTool get(String buildToolName)` which returns BuildTool matching the name passed in the parameter.
-
-Requirements:
-- Library compilation -> Java15
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/build.gradle b/script-plugin/remote-versioned-modular-script-plugin-library/build.gradle
deleted file mode 100644
index bbb12a9..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-library/build.gradle
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * Apply script plugin that contains all the tasks to build:
- * - Java
- * - JUnit Tests
- *
- * Note that a specific version of the plugin should be provided
- */
-apply from: "https://raw.githubusercontent.com/rivancic/gradle-versioned-modular-script-plugin/${property('java-library-plugin.version')}/java-library-plugin.gradle"
-
-group = 'com.rivancic'
-version = '0.0.1-SNAPSHOT'
-
-
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/gradle.properties b/script-plugin/remote-versioned-modular-script-plugin-library/gradle.properties
deleted file mode 100644
index a03294e..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-library/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-java-library-plugin.version=v1.1
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/gradle/wrapper/gradle-wrapper.jar b/script-plugin/remote-versioned-modular-script-plugin-library/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index e708b1c..0000000
Binary files a/script-plugin/remote-versioned-modular-script-plugin-library/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/gradle/wrapper/gradle-wrapper.properties b/script-plugin/remote-versioned-modular-script-plugin-library/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 3c4101c..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-library/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/gradlew b/script-plugin/remote-versioned-modular-script-plugin-library/gradlew
deleted file mode 100755
index 4f906e0..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-library/gradlew
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/env sh
-
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=`expr $i + 1`
- done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-exec "$JAVACMD" "$@"
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/gradlew.bat b/script-plugin/remote-versioned-modular-script-plugin-library/gradlew.bat
deleted file mode 100644
index 107acd3..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-library/gradlew.bat
+++ /dev/null
@@ -1,89 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/readme-content/remote-versioned-modular-plugin-library.png b/script-plugin/remote-versioned-modular-script-plugin-library/readme-content/remote-versioned-modular-plugin-library.png
deleted file mode 100644
index 1cc674b..0000000
Binary files a/script-plugin/remote-versioned-modular-script-plugin-library/readme-content/remote-versioned-modular-plugin-library.png and /dev/null differ
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/settings.gradle b/script-plugin/remote-versioned-modular-script-plugin-library/settings.gradle
deleted file mode 100644
index 33638f9..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-library/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = 'remote-versioned-modular-script-plugin-library'
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/src/main/java/com/rivancic/gradle/BuildTool.java b/script-plugin/remote-versioned-modular-script-plugin-library/src/main/java/com/rivancic/gradle/BuildTool.java
deleted file mode 100644
index f7a6a76..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-library/src/main/java/com/rivancic/gradle/BuildTool.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.rivancic.gradle;
-
-import java.util.List;
-
-public class BuildTool {
- private final String name;
- private final List scriptLanguages;
-
- public BuildTool(String name, List scriptLanguages) {
- this.name = name;
- this.scriptLanguages = scriptLanguages;
- }
-
- public String getName() {
- return name;
- }
-
- public List getScriptLanguages() {
- return scriptLanguages;
- }
-}
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/src/main/java/com/rivancic/gradle/BuildToolsService.java b/script-plugin/remote-versioned-modular-script-plugin-library/src/main/java/com/rivancic/gradle/BuildToolsService.java
deleted file mode 100644
index 9398c3c..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-library/src/main/java/com/rivancic/gradle/BuildToolsService.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.rivancic.gradle;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-public class BuildToolsService {
-
- List buildTools = new ArrayList<>();
-
- public BuildToolsService() {
- BuildTool mavenBuildTool = new BuildTool("Maven", Collections.singletonList("XML"));
- BuildTool gradleBuildTool = new BuildTool("Gradle", Arrays.asList("Groovy", "Kotlin"));
- BuildTool sbtBuildTool = new BuildTool("sbt", Collections.singletonList("Scala"));
- buildTools.add(mavenBuildTool);
- buildTools.add(gradleBuildTool);
- buildTools.add(sbtBuildTool);
- }
-
- public List getAll() {
- return buildTools;
- }
-
- public BuildTool get(String selectedBuildTool) {
- return buildTools.stream()
- .filter(tool -> tool.getName().equals(selectedBuildTool))
- .findFirst()
- .orElseThrow(() -> new IllegalArgumentException("Nonexisting build tool"));
- }
-}
diff --git a/script-plugin/remote-versioned-modular-script-plugin-library/src/test/java/com/rivancic/gradle/BuildToolServiceTest.java b/script-plugin/remote-versioned-modular-script-plugin-library/src/test/java/com/rivancic/gradle/BuildToolServiceTest.java
deleted file mode 100644
index dc1f4f2..0000000
--- a/script-plugin/remote-versioned-modular-script-plugin-library/src/test/java/com/rivancic/gradle/BuildToolServiceTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.rivancic.gradle;
-
-import org.assertj.core.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-import java.util.List;
-
-public class BuildToolServiceTest {
-
- @Test
- void whenGetAllBuildTools_thenReturnAllOfThem() {
- BuildToolsService cut = new BuildToolsService();
- List allBuildTools = cut.getAll();
- Assertions.assertThat(allBuildTools).hasSize(3);
- Assertions.assertThat(allBuildTools.get(0).getName()).isEqualTo("Maven");
- Assertions.assertThat(allBuildTools.get(0).getScriptLanguages()).hasSize(1);
- Assertions.assertThat(allBuildTools.get(0).getScriptLanguages()).contains("XML");
- Assertions.assertThat(allBuildTools.get(1).getName()).isEqualTo("Gradle");
- Assertions.assertThat(allBuildTools.get(1).getScriptLanguages()).hasSize(2);
- Assertions.assertThat(allBuildTools.get(1).getScriptLanguages()).contains("Groovy", "Kotlin");
- Assertions.assertThat(allBuildTools.get(2).getName()).isEqualTo("sbt");
- Assertions.assertThat(allBuildTools.get(2).getScriptLanguages()).hasSize(1);
- Assertions.assertThat(allBuildTools.get(2).getScriptLanguages()).contains("Scala");
- }
-}
diff --git a/script-plugin/remote-versioned-script-plugin/.idea/.gitignore b/script-plugin/remote-versioned-script-plugin/.idea/.gitignore
deleted file mode 100644
index 73f69e0..0000000
--- a/script-plugin/remote-versioned-script-plugin/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
-# Editor-based HTTP Client requests
-/httpRequests/
diff --git a/script-plugin/remote-versioned-script-plugin/.idea/modules/remote-versioned-script-plugin.iml b/script-plugin/remote-versioned-script-plugin/.idea/modules/remote-versioned-script-plugin.iml
deleted file mode 100644
index f779651..0000000
--- a/script-plugin/remote-versioned-script-plugin/.idea/modules/remote-versioned-script-plugin.iml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-script-plugin/README.md b/script-plugin/remote-versioned-script-plugin/README.md
deleted file mode 100644
index 3507cda..0000000
--- a/script-plugin/remote-versioned-script-plugin/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Remote Versioned Script Plugin
-
-This Gradle project shows an example how remote script plugin can be versioned. Client has now the control if he wants
-to upgrade to the new version of the script plugin, or he wants to use the existing one in case it contains any breaking changes.
-
-Check the [build.gradle](build.gradle) script file to see how the plugin is applied.
-
-Source code fo the script plugin is deployed in publicly available [Github repository](https://github.com/rivancic/gradle-versioned-script-plugin).
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-script-plugin/build.gradle b/script-plugin/remote-versioned-script-plugin/build.gradle
deleted file mode 100644
index e25bbfb..0000000
--- a/script-plugin/remote-versioned-script-plugin/build.gradle
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Apply remote versioned Gradle script plugin that contains tasks for ordering files.
- *
- * The syntax is the same as importing script plugin. The only difference is that based on the available option we
- * can provide specific version of that plugin to be downloaded.
- *
- * Version is configurable in that it's specified as [task.plugin.version] property in gradle.properties file and
- * interpolated in a Groovy String.
- */
-apply from: "https://raw.githubusercontent.com/rivancic/gradle-versioned-script-plugin/${property('tasks.plugin.version')}/scriptPlugin.gradle"
-
-wrapper {
- version = "6.8.3"
- distributionType = Wrapper.DistributionType.ALL
-}
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-script-plugin/files/business.jpg b/script-plugin/remote-versioned-script-plugin/files/business.jpg
deleted file mode 100644
index f917733..0000000
Binary files a/script-plugin/remote-versioned-script-plugin/files/business.jpg and /dev/null differ
diff --git a/script-plugin/remote-versioned-script-plugin/files/scanner.wav b/script-plugin/remote-versioned-script-plugin/files/scanner.wav
deleted file mode 100644
index f6faf81..0000000
Binary files a/script-plugin/remote-versioned-script-plugin/files/scanner.wav and /dev/null differ
diff --git a/script-plugin/remote-versioned-script-plugin/files/stock.jpg b/script-plugin/remote-versioned-script-plugin/files/stock.jpg
deleted file mode 100644
index dee521a..0000000
Binary files a/script-plugin/remote-versioned-script-plugin/files/stock.jpg and /dev/null differ
diff --git a/script-plugin/remote-versioned-script-plugin/gradle.properties b/script-plugin/remote-versioned-script-plugin/gradle.properties
deleted file mode 100644
index 3311913..0000000
--- a/script-plugin/remote-versioned-script-plugin/gradle.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-tasks.files.folder=files
-tasks.plugin.version=v2.0
\ No newline at end of file
diff --git a/script-plugin/remote-versioned-script-plugin/gradle/wrapper/gradle-wrapper.jar b/script-plugin/remote-versioned-script-plugin/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index e708b1c..0000000
Binary files a/script-plugin/remote-versioned-script-plugin/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/script-plugin/remote-versioned-script-plugin/gradle/wrapper/gradle-wrapper.properties b/script-plugin/remote-versioned-script-plugin/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 3c4101c..0000000
--- a/script-plugin/remote-versioned-script-plugin/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/script-plugin/remote-versioned-script-plugin/gradlew b/script-plugin/remote-versioned-script-plugin/gradlew
deleted file mode 100755
index 4f906e0..0000000
--- a/script-plugin/remote-versioned-script-plugin/gradlew
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/env sh
-
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=`expr $i + 1`
- done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-exec "$JAVACMD" "$@"
diff --git a/script-plugin/remote-versioned-script-plugin/gradlew.bat b/script-plugin/remote-versioned-script-plugin/gradlew.bat
deleted file mode 100644
index 107acd3..0000000
--- a/script-plugin/remote-versioned-script-plugin/gradlew.bat
+++ /dev/null
@@ -1,89 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/script-plugin/remote-versioned-script-plugin/settings.gradle b/script-plugin/remote-versioned-script-plugin/settings.gradle
deleted file mode 100644
index 2fdba4b..0000000
--- a/script-plugin/remote-versioned-script-plugin/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = 'remote-versioned-script-plugin'
\ No newline at end of file
diff --git a/script-plugin/simple-script-plugin/.gitignore b/script-plugin/simple-script-plugin/.gitignore
deleted file mode 100644
index 2677823..0000000
--- a/script-plugin/simple-script-plugin/.gitignore
+++ /dev/null
@@ -1,152 +0,0 @@
-
-# Created by https://www.toptal.com/developers/gitignore/api/java,gradle,intellij
-# Edit at https://www.toptal.com/developers/gitignore?templates=java,gradle,intellij
-
-### Intellij ###
-# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
-# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
-
-# User-specific stuff
-.idea/**/workspace.xml
-.idea/**/tasks.xml
-.idea/**/usage.statistics.xml
-.idea/**/dictionaries
-.idea/**/shelf
-
-# Generated files
-.idea/**/contentModel.xml
-
-# Sensitive or high-churn files
-.idea/**/dataSources/
-.idea/**/dataSources.ids
-.idea/**/dataSources.local.xml
-.idea/**/sqlDataSources.xml
-.idea/**/dynamic.xml
-.idea/**/uiDesigner.xml
-.idea/**/dbnavigator.xml
-
-# Gradle
-.idea/**/gradle.xml
-.idea/**/libraries
-
-# Gradle and Maven with auto-import
-# When using Gradle or Maven with auto-import, you should exclude module files,
-# since they will be recreated, and may cause churn. Uncomment if using
-# auto-import.
-# .idea/artifacts
-# .idea/compiler.xml
-# .idea/jarRepositories.xml
-# .idea/modules.xml
-# .idea/*.iml
-# .idea/modules
-# *.iml
-# *.ipr
-
-# CMake
-cmake-build-*/
-
-# Mongo Explorer plugin
-.idea/**/mongoSettings.xml
-
-# File-based project format
-*.iws
-
-# IntelliJ
-out/
-
-# mpeltonen/sbt-idea plugin
-.idea_modules/
-
-# JIRA plugin
-atlassian-ide-plugin.xml
-
-# Cursive Clojure plugin
-.idea/replstate.xml
-
-# Crashlytics plugin (for Android Studio and IntelliJ)
-com_crashlytics_export_strings.xml
-crashlytics.properties
-crashlytics-build.properties
-fabric.properties
-
-# Editor-based Rest Client
-.idea/httpRequests
-
-# Android studio 3.1+ serialized cache file
-.idea/caches/build_file_checksums.ser
-
-### Intellij Patch ###
-# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
-
-# *.iml
-# modules.xml
-# .idea/misc.xml
-# *.ipr
-
-# Sonarlint plugin
-# https://plugins.jetbrains.com/plugin/7973-sonarlint
-.idea/**/sonarlint/
-
-# SonarQube Plugin
-# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
-.idea/**/sonarIssues.xml
-
-# Markdown Navigator plugin
-# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
-.idea/**/markdown-navigator.xml
-.idea/**/markdown-navigator-enh.xml
-.idea/**/markdown-navigator/
-
-# Cache file creation bug
-# See https://youtrack.jetbrains.com/issue/JBR-2257
-.idea/$CACHE_FILE$
-
-# CodeStream plugin
-# https://plugins.jetbrains.com/plugin/12206-codestream
-.idea/codestream.xml
-
-### Java ###
-# Compiled class file
-*.class
-
-# Log file
-*.log
-
-# BlueJ files
-*.ctxt
-
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
-
-# Package Files #
-*.jar
-*.war
-*.nar
-*.ear
-*.zip
-*.tar.gz
-*.rar
-
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
-
-### Gradle ###
-.gradle
-build/
-
-# Ignore Gradle GUI config
-gradle-app.setting
-
-# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
-!gradle-wrapper.jar
-
-# Cache of project
-.gradletasknamecache
-
-# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
-# gradle/wrapper/gradle-wrapper.properties
-
-### Gradle Patch ###
-**/build/
-
-# End of https://www.toptal.com/developers/gitignore/api/java,gradle,intellij
diff --git a/script-plugin/simple-script-plugin/.idea/.gitignore b/script-plugin/simple-script-plugin/.idea/.gitignore
deleted file mode 100644
index 73f69e0..0000000
--- a/script-plugin/simple-script-plugin/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
-# Editor-based HTTP Client requests
-/httpRequests/
diff --git a/script-plugin/simple-script-plugin/README.md b/script-plugin/simple-script-plugin/README.md
deleted file mode 100644
index bb5c81c..0000000
--- a/script-plugin/simple-script-plugin/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Script Plugin
-
-This Gradle project shows how the build logic can be extracted out of main build.gradle build script.
-You would want to apply this kind of refactoring if build.gradle script contains more than one group of tasks.
-This will be more than likely when you are working on a real world applications.
-
-This example builds on top of previous project that was used for creating [Gradle tasks](../../task/file-tasks-assignment-done).
-
-Check the [build.gradle](build.gradle) script file to see how the plugin is applied.
\ No newline at end of file
diff --git a/script-plugin/simple-script-plugin/build.gradle b/script-plugin/simple-script-plugin/build.gradle
deleted file mode 100644
index fda24d4..0000000
--- a/script-plugin/simple-script-plugin/build.gradle
+++ /dev/null
@@ -1,8 +0,0 @@
-import org.gradle.api.DefaultTask
-
-/**
- * From the applied script plugin this project will have access to two additional files tasks.
- * TODO add description -> And add versioning example with tags
- * TODO group tasks in remote scripts into customBuild group
- */
-apply from: 'scriptPlugin.gradle'
\ No newline at end of file
diff --git a/script-plugin/simple-script-plugin/files/business.jpg b/script-plugin/simple-script-plugin/files/business.jpg
deleted file mode 100644
index f917733..0000000
Binary files a/script-plugin/simple-script-plugin/files/business.jpg and /dev/null differ
diff --git a/script-plugin/simple-script-plugin/files/scanner.wav b/script-plugin/simple-script-plugin/files/scanner.wav
deleted file mode 100644
index f6faf81..0000000
Binary files a/script-plugin/simple-script-plugin/files/scanner.wav and /dev/null differ
diff --git a/script-plugin/simple-script-plugin/files/stock.jpg b/script-plugin/simple-script-plugin/files/stock.jpg
deleted file mode 100644
index dee521a..0000000
Binary files a/script-plugin/simple-script-plugin/files/stock.jpg and /dev/null differ
diff --git a/script-plugin/simple-script-plugin/gradle.properties b/script-plugin/simple-script-plugin/gradle.properties
deleted file mode 100644
index ed9db98..0000000
--- a/script-plugin/simple-script-plugin/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-tasks.files.folder=files
\ No newline at end of file
diff --git a/script-plugin/simple-script-plugin/gradle/wrapper/gradle-wrapper.jar b/script-plugin/simple-script-plugin/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index e708b1c..0000000
Binary files a/script-plugin/simple-script-plugin/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/script-plugin/simple-script-plugin/gradle/wrapper/gradle-wrapper.properties b/script-plugin/simple-script-plugin/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 7c31d2d..0000000
--- a/script-plugin/simple-script-plugin/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Sun Feb 07 15:12:59 CET 2021
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStorePath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
diff --git a/script-plugin/simple-script-plugin/gradlew b/script-plugin/simple-script-plugin/gradlew
deleted file mode 100755
index 4f906e0..0000000
--- a/script-plugin/simple-script-plugin/gradlew
+++ /dev/null
@@ -1,185 +0,0 @@
-#!/usr/bin/env sh
-
-#
-# Copyright 2015 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=`expr $i + 1`
- done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-exec "$JAVACMD" "$@"
diff --git a/script-plugin/simple-script-plugin/gradlew.bat b/script-plugin/simple-script-plugin/gradlew.bat
deleted file mode 100644
index 107acd3..0000000
--- a/script-plugin/simple-script-plugin/gradlew.bat
+++ /dev/null
@@ -1,89 +0,0 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/script-plugin/simple-script-plugin/scriptPlugin.gradle b/script-plugin/simple-script-plugin/scriptPlugin.gradle
deleted file mode 100644
index 0844d16..0000000
--- a/script-plugin/simple-script-plugin/scriptPlugin.gradle
+++ /dev/null
@@ -1,107 +0,0 @@
-import java.nio.file.Files
-import java.nio.file.StandardCopyOption
-import java.nio.file.Paths
-
-/**
- * This build script contains two tasks. Main functionality is sorting files by their extension.
- *
- * Tasks are grouped into "files" group.
- *
- * Root folder containing files that have to be sorted is parametrized through Gradle properties with the key [tasks.files.folder].
- * Property has to be accessed through the project.ext map as direct reference doesn't work if property key is named with the dot notation.
- */
-
-/**
- * This method sorts files inside specific directory. It does that in the source directory directly and doesn't use
- * build directory. Files are being sorted based on their extension.
- *
- * Files are being resolved with the Project#file() method, as this way we get correct path to the relative path.
- * Only none hidden files are taken into consideration.
- *
- * For every extension new subdirectory is created and file with that extension is moved to matching subdirectory.
- */
-tasks.register('sortFiles') {
- group="files"
- description="Sorts files in given directory into subdirectories based on their file extensions"
-
- doLast { // action that will be executed
- logger.info "==== Sorting Files ===="
- logger.info ""
-
- // Show this in the example
- // https://stackoverflow.com/questions/37101589/how-to-read-a-properties-files-and-use-the-values-in-project-gradle-script
-
- file(project.ext['tasks.files.folder'])
- .listFiles({ file -> file.isFile() && !file.isHidden() } as FileFilter)
- .each {
-
- // Extract name and extension of the file
- def fileName = it.getName()
- def extension = getExtensionOf fileName
-
- // Create dir of that extension
- mkdir "files/" + extension + "/"
-
- // Move file to that directory
- Files.move(it.toPath(), Paths.get(files("files/" + extension + "/" + fileName).asPath), StandardCopyOption.REPLACE_EXISTING)
- }
-
- logger.info ""
- logger.info "======================="
- }
-}
-
-/**
- * Is un-sorting the files, which does exactly the opposite of the sortFiles task. It grabs all the files in subdirectories and
- * moves them tot he root directory. Subdirectories are deleted.
- */
-task unSortFiles {
- group="files"
- description="Reverts sorting of files; moves all files back to root of the given directory"
-
- doLast {
- logger.info "==== Un-Sorting Files ===="
- logger.info ""
-
- def rootFile = file(project.ext['tasks.files.folder'])
- unSortRecursively(rootFile, rootFile.toPath())
-
- logger.info ""
- logger.info "======================="
- }
-}
-
-/**
- * It recursively walks through directories moves files to the root directory and deletes subdirectories.
- * @param directory current directory to be un-sorted
- * @param rootDirectory where the files should be moved
- */
-void unSortRecursively(File directory, java.nio.file.Path rootDirectory) {
- directory.listFiles().each {
-
- // If its file move it back to root directory
- if (it.isFile() && !it.isHidden()) {
- Files.move(it.toPath(), Paths.get(rootDirectory.toString(), it.getName()), StandardCopyOption.REPLACE_EXISTING)
- }
-
- // Remove directories
- if (it.isDirectory()) {
-
- // Go through it
- unSortRecursively it, rootDirectory
-
- // Remove it
- it.delete()
- }
- }
-}
-
-/**
- * Get file extension from its file name
- *
- * @param filename from which extension will be extracted
- * @return extension of the file
- */
-static String getExtensionOf(String filename) {
- return filename.substring(filename.lastIndexOf(".") + 1)
-}
\ No newline at end of file
diff --git a/script-plugin/simple-script-plugin/settings.gradle b/script-plugin/simple-script-plugin/settings.gradle
deleted file mode 100644
index 220b30e..0000000
--- a/script-plugin/simple-script-plugin/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = 'simple-script-plugin'
\ No newline at end of file
diff --git a/task/README.md b/task/README.md
index 37d715e..bf31150 100644
--- a/task/README.md
+++ b/task/README.md
@@ -2,9 +2,9 @@
This directory contains assignments and examples with the focus on Gradle tasks.
-| Module | Description | External Link |
+| Module | Description | Course/Assignment Link |
| ------------- |:-------------:|-------------:|
-| **[file-tasks-assignment](file-tasks-assignment/)** | Initial Gradle project structure for the assignment to test you knowledge about Gradle tasks | Task assignment |
+| **[file-tasks-assignment](file-tasks-assignment/)** | Initial Gradle project structure for the assignment to test you knowledge about Gradle tasks. Instructions are provided in the README.md file | Task assignment |
| **[file-tasks-assignment-done](file-tasks-assignment-done/)** | Implemented solution for the Gradle tasks assignment | Task assignment review |
## Resources
diff --git a/task/file-tasks-assignment-done/README.md b/task/file-tasks-assignment-done/README.md
index d0a9734..a9a8a7f 100644
--- a/task/file-tasks-assignment-done/README.md
+++ b/task/file-tasks-assignment-done/README.md
@@ -1,7 +1,7 @@
# File Tasks Assignment Done
-Complete solution of the [File Tasks Assignment](../file-tasks-assignment). It's not the best solution, and only
-correct solution. Let's see maybe you managed to make file managing tasks more efficient. I will explain my solution that
-is implemented here in the following Assignment review video.
+Complete solution of the [File Tasks Assignment](../file-tasks-assignment). I will explain my solution that
+is implemented here in the following Assignment review video. It's not the best solution, and only
+correct solution. Let's see maybe you managed to make file managing tasks more efficient.
You can also go through detailed comments in the [build.gradle](build.gradle) file itself.
\ No newline at end of file
diff --git a/task/file-tasks-assignment-done/build.gradle b/task/file-tasks-assignment-done/build.gradle
index c2e5bc2..61d9582 100644
--- a/task/file-tasks-assignment-done/build.gradle
+++ b/task/file-tasks-assignment-done/build.gradle
@@ -1,9 +1,14 @@
import java.nio.file.Files
+import java.nio.file.Path
import java.nio.file.StandardCopyOption
import java.nio.file.Paths
+import java.nio.file.attribute.FileTime
+import java.time.Instant
+import java.time.ZoneOffset
+import java.time.format.DateTimeFormatter
/**
- * This build script contains two tasks. Main functionality is sorting files by their extension.
+ * This build script contains two tasks. Main functionality is sorting files by their extension or creation date.
*
* Tasks are grouped into "files" group.
*
@@ -12,98 +17,135 @@ import java.nio.file.Paths
*/
/**
- * This method sorts files inside specific directory. It does that in the source directory directly and doesn't use
- * build directory. Files are being sorted based on their extension.
+ * This method sorts files from specific directory and copies them to build/files directory.
+ * Files are being sorted based on their extension or creation date. Default sorting type is by creation date.
+ * One can explicitly define sorting type with setting following property key [tasks.files.sortType] to value:
+ *
+ *
date
+ *
extension
+ *
*
* Files are being resolved with the Project#file() method, as this way we get correct path to the relative path.
* Only none hidden files are taken into consideration.
*
- * For every extension new subdirectory is created and file with that extension is moved to matching subdirectory.
+ * Based on sorting type new subdirectory is created in build target and file is copied to matching subdirectory.
+ * Name of the subdirectory is defined with FileDirectoryMapper.
*/
tasks.register('sortFiles') {
- group="files"
- description="Sorts files in given directory into subdirectories based on their file extensions"
-
- doLast { // action that will be executed
- logger.info "==== Sorting Files ===="
- logger.info ""
-
- /**
- * Be aware that as property key uses dot notation it has to be accessed throuth project.ext['key'] expression.
- * Just referring to tasks.files.folder does not work directly in Gradle.
- * On the other hand tasksFilesFolder as a key would work just fine, you could access it directly in Gradle.
- */
- file(project.ext['tasks.files.folder'])
- .listFiles({ file -> file.isFile() && !file.isHidden() } as FileFilter)
- .each {
-
- // Extract name and extension of the file
- def fileName = it.getName()
- def extension = getExtensionOf fileName
-
- // Create dir of that extension
- mkdir "files/" + extension + "/"
-
- // Move file to that directory
- Files.move(it.toPath(), Paths.get(files("files/" + extension + "/" + fileName).asPath), StandardCopyOption.REPLACE_EXISTING)
- }
-
- logger.info ""
- logger.info "======================="
- }
-}
+ group = "files"
+ description = "Sorts files in given directory into build.files subdirectories based on the sorting type [creationDate,extension]"
-/**
- * Is un-sorting the files, which does exactly the opposite of the sortFiles task. It grabs all the files in subdirectories and
- * moves them tot he root directory. Subdirectories are deleted.
- */
-task unSortFiles {
- group="files"
- description="Reverts sorting of files; moves all files back to root of the given directory"
+ doLast { // action that will be executed
+ logger.info "==== Sorting Files ===="
+ logger.info ""
- doLast {
- logger.info "==== Un-Sorting Files ===="
- logger.info ""
+ file(project.ext['tasks.files.folder'])
+ .listFiles({file -> file.isFile() && !file.isHidden() } as FileFilter)
+ .each {
- def rootFile = file(project.ext['tasks.files.folder'])
- unSortRecursively(rootFile, rootFile.toPath())
+ logger.info ("Filename: " + it.name)
- logger.info ""
- logger.info "======================="
- }
-}
+ // Get directory for the file based on the sorting type
+ def fileMapper = getFileDirectoryMapper(project, logger)
+ def directory = fileMapper.getDirectory(it)
-/**
- * It recursively walks through directories moves files to the root directory and deletes subdirectories.
- * @param directory current directory to be un-sorted
- * @param rootDirectory where the files should be moved
- */
-void unSortRecursively(File directory, java.nio.file.Path rootDirectory) {
- directory.listFiles().each {
+ // Create new directory inside build folder
+ mkdir project.layout.buildDirectory.dir("files" + "/" + directory + "/")
- // If its file move it back to root directory
- if (it.isFile() && !it.isHidden()) {
- Files.move(it.toPath(), Paths.get(rootDirectory.toString(), it.getName()), StandardCopyOption.REPLACE_EXISTING)
+ // Copy file to sorted directory inside build directory
+ Files.copy(it.toPath(), project.layout.buildDirectory.dir("files" + "/" + directory + "/" + it.getName()).get().asFile.toPath(), StandardCopyOption.REPLACE_EXISTING)
}
- // Remove directories
- if (it.isDirectory()) {
+ logger.info ""
+ logger.info "======================="
+ }
- // Go through it
- unSortRecursively it, rootDirectory
+ dependsOn tasks.named("clean")
+}
- // Remove it
- it.delete()
- }
+tasks.register('clean') {
+ group = "files"
+ description = "Clean build directory"
+
+ doLast {
+ logger.info "==== Clean build ===="
+ logger.info ""
+
+ if (project.layout.buildDirectory.asFile.get().exists()) {
+ try (def stream = Files.walk(project.layout.buildDirectory.asFile.get().toPath())) {
+ stream.sorted(Comparator.reverseOrder())
+ .map(Path::toFile)
+ .peek(file -> logger.info("File to del ${file.toString()}"))
+ .map(File::delete).count()
+ }
}
+
+ logger.info ""
+ logger.info "======================="
+ }
}
/**
- * Get file extension from its file name
+ * Fetches sorting type from [tasks.files.sortType] properties. If property is not present then files will be sorted by the date.
*
- * @param filename from which extension will be extracted
- * @return extension of the file
+ * @param project holding properties.
+ * @param logger for logging missing properties
+ * @return FileDirectoryMapper that actually defines sorting algorithm
+ */
+static FileDirectoryMapper getFileDirectoryMapper(Project project, Logger logger) {
+ def sortType
+ if (project.hasProperty('tasks.files.sortType')) {
+ sortType = project.ext['tasks.files.sortType']
+ if (sortType == "extension") {
+ return new FileDirectoryExtensionMapper()
+ } else if (sortType == "date") {
+ return new FileDirectoryDateMapper()
+ } else {
+ throw new InvalidUserDataException("Invalid property tasks.files.sortType value provided [" + sortType + "]. Valid values are ['extension','date']")
+ }
+ } else {
+ logger.info("Property [tasks.files.sortType] isn't set, default sorting will be done by creation date")
+ return new FileDirectoryDateMapper()
+ }
+}
+
+/**
+ * Implements mapping a file to specific directory name. The logic is based on the sorting algorithm.
+ */
+interface FileDirectoryMapper {
+ String getDirectory(File file)
+}
+
+/**
+ * Maps file creation date to directory name.
+ */
+class FileDirectoryDateMapper implements FileDirectoryMapper {
+
+ @Override
+ String getDirectory(File file) {
+ FileTime creationTime = Files.getAttribute(Paths.get(file.path), "creationTime") as FileTime
+ DateTimeFormatter fileCreationDateFormat = DateTimeFormatter.ofPattern("MM-YYYY")
+ return fileCreationDateFormat.format(Instant.ofEpochMilli(creationTime.toMillis()).atZone(ZoneOffset.UTC).toLocalDate())
+ }
+}
+
+/**
+ * Maps file extension to directory name.
*/
-static String getExtensionOf(String filename) {
+class FileDirectoryExtensionMapper implements FileDirectoryMapper {
+
+ @Override
+ String getDirectory(File file) {
+ return getExtensionOf(file.getName())
+ }
+
+ /**
+ * Get file extension from its file name
+ *
+ * @param filename from which extension will be extracted
+ * @return extension of the file
+ */
+ static String getExtensionOf(String filename) {
return filename.substring(filename.lastIndexOf(".") + 1)
+ }
}
\ No newline at end of file
diff --git a/precompiled-plugin/precompiled-plugin/files/business.jpg b/task/file-tasks-assignment-done/files/business.jpg
similarity index 100%
rename from precompiled-plugin/precompiled-plugin/files/business.jpg
rename to task/file-tasks-assignment-done/files/business.jpg
diff --git a/task/file-tasks-assignment-done/files/jpg/business.jpg b/task/file-tasks-assignment-done/files/jpg/business.jpg
deleted file mode 100644
index f917733..0000000
Binary files a/task/file-tasks-assignment-done/files/jpg/business.jpg and /dev/null differ
diff --git a/task/file-tasks-assignment-done/files/jpg/stock.jpg b/task/file-tasks-assignment-done/files/jpg/stock.jpg
deleted file mode 100644
index dee521a..0000000
Binary files a/task/file-tasks-assignment-done/files/jpg/stock.jpg and /dev/null differ
diff --git a/precompiled-plugin/precompiled-plugin/files/scanner.wav b/task/file-tasks-assignment-done/files/scanner.wav
similarity index 100%
rename from precompiled-plugin/precompiled-plugin/files/scanner.wav
rename to task/file-tasks-assignment-done/files/scanner.wav
diff --git a/precompiled-plugin/precompiled-plugin/files/stock.jpg b/task/file-tasks-assignment-done/files/stock.jpg
similarity index 100%
rename from precompiled-plugin/precompiled-plugin/files/stock.jpg
rename to task/file-tasks-assignment-done/files/stock.jpg
diff --git a/task/file-tasks-assignment-done/files/wav/scanner.wav b/task/file-tasks-assignment-done/files/wav/scanner.wav
deleted file mode 100644
index f6faf81..0000000
Binary files a/task/file-tasks-assignment-done/files/wav/scanner.wav and /dev/null differ
diff --git a/task/file-tasks-assignment-done/gradle.properties b/task/file-tasks-assignment-done/gradle.properties
index ed9db98..d6f9ea4 100644
--- a/task/file-tasks-assignment-done/gradle.properties
+++ b/task/file-tasks-assignment-done/gradle.properties
@@ -1 +1,2 @@
-tasks.files.folder=files
\ No newline at end of file
+tasks.files.folder=files
+tasks.files.sortType=extension
\ No newline at end of file
diff --git a/task/file-tasks-assignment-done/gradle/wrapper/gradle-wrapper.properties b/task/file-tasks-assignment-done/gradle/wrapper/gradle-wrapper.properties
index b82fbc0..efdcd28 100644
--- a/task/file-tasks-assignment-done/gradle/wrapper/gradle-wrapper.properties
+++ b/task/file-tasks-assignment-done/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
#Sun Feb 07 15:12:59 CET 2021
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
diff --git a/task/file-tasks-assignment/README.md b/task/file-tasks-assignment/README.md
index ddf1a08..8c27e48 100644
--- a/task/file-tasks-assignment/README.md
+++ b/task/file-tasks-assignment/README.md
@@ -9,36 +9,41 @@ Big part of build automation tool like Gradle is to manage source code and gener
you get familiar with managing files and directories.
Remember we always want to keep Gradle tasks neatly organized so users will understand the intention of our tasks and
-will be able to find them quickly next time. We can help users with grouping and writing appropriate
-description for each of the tasks.
+will be able to find them quickly next time. We can help users with **grouping** and writing appropriate
+**description** for each of the tasks.
### 1) sortFiles task
* Task with the name **sortFiles** has to sort all the files in the provided directory.
* Directory relative path is provided in the gradle.properties file under following key: **tasks.files.folder**
-* Sorting has to be executed in such a way that a new directory is created inside the provided directory based on the
-file name extensions of the files.
+* Sorted files have to be moved to **build/files** directory
+* You have to support 2 types of sorting:
+ * **Extension** - Files with same extension are grouped in the directory named by extension
+ * **Creation date** - Files with same creation date month/year will be grouped in the same directory named by creation date month/year
+* Sorting algorithm can be specified through **tasks.files.sortType** property with values **extension** or **creationDate**.
+* Default sort algorithm is by creationDate
* For example if in the provided directory there is a file named image.jpg, then your build script has to create a
-new jpg directory inside provided directory and move image.jpg file inside of it.
-
+new jpg directory inside provided build/files and move image.jpg file inside it.
Example of provided unsorted files
-![Unsorted files](readme-content/unsorted-files.png)
+![Unsorted files](readme-content/task-assignment-files-unsorted.png)
+
+After one executes `graldew sortedFiles` command, every file from the root of provided directory has to be stored in a build/files subfolder by default based on the creation date as in the example below:
+
+![Unsorted files](readme-content/task-assignment-files-sorted-under-build.png)
-After one executes `graldew sortedFiles` command every file from the root of provided file has to be stored in a subfolder based on the file name extension as in the example below:
+If in gradle.properties `tasks.files.sortType=extension` is set then the files should be sorted by extension instead:
-![Unsorted files](readme-content/sorted-files.png)
+![Unsorted files](readme-content/task-assignment-files-sorted-by-extensionunder-build.png)
-### 2) unSortFiles task
+### 2) clean task
-Task has to do the opposite of the sortFiles task. When files are sorted in subdirectories with the extension name if
-one runs `gradlew unSortFiles` then the result should be that all files form provided directory are again located at
-the root of it and all subfolders have to be deleted.
+Simple task that has to remove whole build/files directory.
### Additional requirements
-Both tasks have to be grouped under files tasks and they have to have appropriate description.
+Both tasks have to be grouped under Files tasks and they have to have appropriate description.
If you run `gradlew tasks` above tasks have to be show as follows.
```
@@ -57,8 +62,8 @@ wrapper - Generates Gradle wrapper files.
Files tasks
-----------
-sortFiles - Sorts files in given directory into subdirectories based on their file extensions
-unSortFiles - Reverts sorting of files; moves all files back to root of the given directory
+sortFiles - Sorts files in given directory into build.files subdirectories based on the sorting type [creationDate,extension]
+clean - Clean build directory
Help tasks
----------
@@ -71,19 +76,19 @@ dependencyInsight - Displays the insight into a specific dependency in root proj
**General**
-- Make sure you have IntelliJ IDEA properly set up, so you will have autocompletion available, you'll be able to investigate
-source code of Gradle API and debug build.grade script. Check following lecture to find out more !!! TODO link to lecture !!!
-- You can use logger instance to print messages !!! TODO link to logger section !!!
-- You can read gradle project properties from project.ext !!! TODO link to project section !!!
+- You can use logger instance to print messages that will help you debug script logic.
+- Make sure you have IDE properly set up, so you will have autocompletion available, you'll be able to investigate
+source code of Gradle API and debug build.grade script.
+- You can read gradle extra properties from project.ext
**Tasks**
- With the [Task#doLast()](https://docs.gradle.org/current/dsl/org.gradle.api.Task.html#org.gradle.api.Task:doLast(groovy.lang.Closure)) convenience method you can specify Gradle action for the task, that will run when the task will be executed during execution phase.
-**Managing**
+**Managing Files**
- Method [Project#file()](https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#org.gradle.api.Project:file(java.lang.Object)) gets you relative path to the file from project location !!! TODO link to project section !!!
- Method [Project#mkdir()](https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#org.gradle.api.Project:mkdir(java.lang.Object)) can create new directory [Gradle Creating directories](https://docs.gradle.org/current/userguide/working_with_files.html#sec:creating_directories_example)
-- [java.nio.Files.move()](https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/nio/file/Files.html#move(java.nio.file.Path,java.nio.file.Path,java.nio.file.CopyOption...)) can move file from source to target directory
+- [java.nio.Files.copy()](https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/nio/file/Files.html#copy(java.nio.file.Path,java.nio.file.Path,java.nio.file.CopyOption...)) can copy file from source to target directory
- You can use all other helper classes from Java [java.io](https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/io/package-summary.html) and [java.nio.file](https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/nio/file/package-summary.html) packages to manage files and folders.
diff --git a/task/file-tasks-assignment/gradle/wrapper/gradle-wrapper.properties b/task/file-tasks-assignment/gradle/wrapper/gradle-wrapper.properties
index b82fbc0..efdcd28 100644
--- a/task/file-tasks-assignment/gradle/wrapper/gradle-wrapper.properties
+++ b/task/file-tasks-assignment/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
#Sun Feb 07 15:12:59 CET 2021
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
diff --git a/task/file-tasks-assignment/readme-content/sorted-files.png b/task/file-tasks-assignment/readme-content/sorted-files.png
deleted file mode 100644
index bdc0ac9..0000000
Binary files a/task/file-tasks-assignment/readme-content/sorted-files.png and /dev/null differ
diff --git a/task/file-tasks-assignment/readme-content/task-assignment-files-sorted-by-extensionunder-build.png b/task/file-tasks-assignment/readme-content/task-assignment-files-sorted-by-extensionunder-build.png
new file mode 100644
index 0000000..42ae4ac
Binary files /dev/null and b/task/file-tasks-assignment/readme-content/task-assignment-files-sorted-by-extensionunder-build.png differ
diff --git a/task/file-tasks-assignment/readme-content/task-assignment-files-sorted-under-build.png b/task/file-tasks-assignment/readme-content/task-assignment-files-sorted-under-build.png
new file mode 100644
index 0000000..1a51ea8
Binary files /dev/null and b/task/file-tasks-assignment/readme-content/task-assignment-files-sorted-under-build.png differ
diff --git a/task/file-tasks-assignment/readme-content/task-assignment-files-unsorted.png b/task/file-tasks-assignment/readme-content/task-assignment-files-unsorted.png
new file mode 100644
index 0000000..32bb224
Binary files /dev/null and b/task/file-tasks-assignment/readme-content/task-assignment-files-unsorted.png differ
diff --git a/task/file-tasks-assignment/readme-content/unsorted-files.png b/task/file-tasks-assignment/readme-content/unsorted-files.png
deleted file mode 100644
index 4b510e3..0000000
Binary files a/task/file-tasks-assignment/readme-content/unsorted-files.png and /dev/null differ