From 12eeaa941ad84d3f1c3d4dfb7bf9251d42e8b2cd Mon Sep 17 00:00:00 2001 From: Almog Tavor Date: Sat, 24 Sep 2022 14:17:08 +0300 Subject: [PATCH] feat: compile code with JDK 1.8 for wider compatability --- build.gradle | 61 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index d8af6ce..975e92f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,32 +1,59 @@ +import java.nio.file.Files +import java.nio.file.Paths + plugins { - id 'java-gradle-plugin' - id "com.gradle.plugin-publish" version "1.0.0" - id 'se.bjurr.gitchangelog.git-changelog-gradle-plugin' version '1.73.0' - id 'idea' + id("java-gradle-plugin") + id("com.gradle.plugin-publish") version "1.0.0" + id("se.bjurr.gitchangelog.git-changelog-gradle-plugin") version "1.73.0" + id("idea") + id("org.gradle.kotlin.kotlin-dsl") version "3.1.0" } -group = 'io.github.almogtavor' -version = '1.0.4' +group = "io.github.almogtavor" +version = "1.1.0" +repositories { + mavenCentral() + maven { url = uri("https://repo.spring.io/milestone") } +} + +dependencies { + implementation("com.fasterxml.jackson.module:jackson-module-kotlin:+") + implementation("io.projectreactor.kotlin:reactor-kotlin-extensions:+") + implementation("org.jetbrains.kotlin:kotlin-reflect:+") + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:+") +} pluginBundle { - website = 'https://github.com/almogtavor/auto-composite-build' - vcsUrl = 'https://github.com/almogtavor/auto-composite-build' + website = "https://github.com/almogtavor/auto-composite-build" + vcsUrl = "https://github.com/almogtavor/auto-composite-build" // Individual tags for published plugins; overrides bundle tags for the mentioned plugins. - // The keys used to specify the plugins must match the names of the blocks in 'gradlePlugin.plugins' (see below). - pluginTags = [ - autoCompositeBuildPlugin: ['composite-build', 'multiproject'] - ] + // The keys used to specify the plugins must match the names of the blocks in "gradlePlugin.plugins" (see below). + tags = Arrays.asList("composite-build", "multiproject") } gradlePlugin { plugins { - autoCompositeBuildPlugin { - id = 'io.github.almogtavor.auto-composite-build' - implementationClass = 'io.github.almogtavor.AutoCompositeBuildPlugin' - displayName = 'A Gradle plugin to automate the process of working with composite builds' - description = 'This Gradle plugin lets you easily use composite build within a team.' + create("autoCompositeBuildPlugin") { + id = "io.github.almogtavor.auto-composite-build" + implementationClass = "io.github.almogtavor.AutoCompositeBuildPlugin" + displayName = "A Gradle plugin to automate the process of working with composite builds" + description = "This Gradle plugin lets you easily use composite build within a team." } } } + +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(8)) + } +} + +task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { + fromRepo = file("$projectDir") + file = file("CHANGELOG.md"); + String mustacheFile = getProjectDir().getAbsolutePath() + File.separator + "changelog.mustache" + templateContent = String.join("\n", Files.readAllLines(Paths.get(mustacheFile))) +} +