-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
417 changed files
with
803 additions
and
805 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
id("java-library") | ||
} | ||
|
||
java { | ||
toolchain.languageVersion = JavaLanguageVersion.of(17) | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...build-logic/java-plugins/build.gradle.kts → .../my-build-logic/java-plugins/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
id("groovy-gradle-plugin") | ||
} | ||
|
||
dependencies { | ||
|
11 changes: 11 additions & 0 deletions
11
03_Plugins/my-build-logic/java-plugins/src/main/groovy/my-java-application.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
plugins { | ||
id("application") | ||
} | ||
|
||
java { | ||
toolchain.languageVersion = JavaLanguageVersion.of(17) | ||
} | ||
|
||
tasks.named("test") { | ||
useJUnitPlatform() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
03_Plugins/my-build-logic/java-plugins/src/main/kotlin/my-java-application.gradle.kts
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins { | ||
id("groovy-gradle-plugin") | ||
} |
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
04_Tasks/my-build-logic/java-plugins/src/main/groovy/my-java-application.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
id("application") | ||
} | ||
|
||
java { | ||
toolchain.languageVersion = JavaLanguageVersion.of(17) | ||
} |
7 changes: 7 additions & 0 deletions
7
04_Tasks/my-build-logic/java-plugins/src/main/groovy/my-java-library.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
id("java-library") | ||
} | ||
|
||
java { | ||
toolchain.languageVersion = JavaLanguageVersion.of(17) | ||
} |
7 changes: 0 additions & 7 deletions
7
04_Tasks/my-build-logic/java-plugins/src/main/kotlin/my-java-application.gradle.kts
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
04_Tasks/my-build-logic/java-plugins/src/main/kotlin/my-java-library.gradle.kts
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tasks.register("checkAll") { | ||
dependsOn(subprojects.collect { ":${it.name}:check" }) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins { | ||
id("groovy-gradle-plugin") | ||
} |
3 changes: 0 additions & 3 deletions
3
05_Lifecycle_Tasks/my-build-logic/java-plugins/build.gradle.kts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tasks.register("checkAll") { | ||
dependsOn(subprojects.collect { ":${it.name}:check" }) | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
def globalBuildGroup = "My global build" | ||
def ciBuildGroup = "My CI build" | ||
|
||
tasks.named("tasks") { | ||
displayGroup = globalBuildGroup | ||
} | ||
|
||
tasks.register("qualityCheckAll") { | ||
group = globalBuildGroup | ||
dependsOn(subprojects.collect { ":${it.name}:qualityCheck" }) | ||
} | ||
|
||
tasks.register("checkAll") { | ||
group = ciBuildGroup | ||
dependsOn(subprojects.collect { ":${it.name}:check" }) | ||
dependsOn(gradle.includedBuilds.collect { it.task(":checkAll") }) | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
06_Configuring_Task_Inputs_And_Outputs/my-build-logic/java-plugins/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins { | ||
id("groovy-gradle-plugin") | ||
} |
3 changes: 0 additions & 3 deletions
3
06_Configuring_Task_Inputs_And_Outputs/my-build-logic/java-plugins/build.gradle.kts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...g_Task_Inputs_And_Outputs/my-build-logic/java-plugins/src/main/groovy/my-java-base.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
id("java") | ||
} | ||
|
||
java { | ||
toolchain.languageVersion = JavaLanguageVersion.of(17) | ||
} |
File renamed without changes.
7 changes: 0 additions & 7 deletions
7
...sk_Inputs_And_Outputs/my-build-logic/java-plugins/src/main/kotlin/my-java-base.gradle.kts
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
07_Implementing_Tasks_and_Extensions/my-build-logic/java-plugins/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins { | ||
id("groovy-gradle-plugin") | ||
} |
3 changes: 0 additions & 3 deletions
3
07_Implementing_Tasks_and_Extensions/my-build-logic/java-plugins/build.gradle.kts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...ting_Tasks_and_Extensions/my-build-logic/java-plugins/src/main/groovy/my-java-base.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
id("java") | ||
} | ||
|
||
java { | ||
toolchain.languageVersion = JavaLanguageVersion.of(17) | ||
} |
File renamed without changes.
36 changes: 36 additions & 0 deletions
36
...ns/my-build-logic/java-plugins/src/main/groovy/myproject/tasks/GenerateStartScript.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package myproject.tasks | ||
|
||
import org.gradle.api.DefaultTask | ||
import org.gradle.api.file.RegularFileProperty | ||
import org.gradle.api.provider.Property | ||
import org.gradle.api.tasks.CacheableTask | ||
import org.gradle.api.tasks.Input | ||
import org.gradle.api.tasks.OutputFile | ||
import org.gradle.api.tasks.TaskAction | ||
|
||
import java.nio.file.Files | ||
import static java.nio.file.attribute.PosixFilePermission.* | ||
|
||
@CacheableTask | ||
abstract class GenerateStartScript extends DefaultTask { | ||
|
||
@Input | ||
abstract Property<String> getMainClass() | ||
|
||
@OutputFile | ||
abstract RegularFileProperty getScriptFile() | ||
|
||
@TaskAction | ||
def generate() { | ||
def main = mainClass.get() // String | ||
def out = scriptFile.get().asFile // java.io.File | ||
def script = "java -cp 'libs/*' $main" | ||
|
||
out.text = script | ||
Files.setPosixFilePermissions(out.toPath(), [ | ||
OWNER_READ, OWNER_WRITE, OWNER_EXECUTE, | ||
GROUP_READ, GROUP_EXECUTE, | ||
OTHERS_EXECUTE, OTHERS_READ | ||
] as Set) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
..._Tasks_and_Extensions/my-build-logic/java-plugins/src/main/kotlin/my-java-base.gradle.kts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.