Skip to content

Commit

Permalink
#3: added proper build configuration + an empty plugin class
Browse files Browse the repository at this point in the history
  • Loading branch information
tlinkowski committed Jun 14, 2019
1 parent f390611 commit 026dc1e
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 0 deletions.
22 changes: 22 additions & 0 deletions subprojects/plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2019 Tomasz Linkowski.
#
# 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
#
# http://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.
#
version=0.1
# DEPENDENCIES
kordampVersion=0.21.0
spockVersion=1.3-groovy-2.5
groovyVersion=2.5.6
36 changes: 36 additions & 0 deletions subprojects/plugin/plugin.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,48 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
//region MAIN
kotlin("jvm") version "1.3.30"
`java-gradle-plugin`
`kotlin-dsl`
//endregion

//region TEST
groovy
//endregion
}

//region gradle.properties
val kordampVersion: String by project
val spockVersion: String by project
val groovyVersion: String by project
//endregion

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}

repositories {
gradlePluginPortal() // for other Gradle plugins
}

dependencies {
//region MAIN
implementation(kotlin("stdlib-jdk8"))
implementation(group = "org.kordamp.gradle", name = "base-gradle-plugin", version = kordampVersion)
//endregion

//region TEST
testImplementation(group = "org.spockframework", name = "spock-core", version = spockVersion)
testImplementation(group = "org.codehaus.groovy", name = "groovy-all", version = groovyVersion)
//endregion
}

gradlePlugin {
plugins {
create("TLinkowskiSuperpom") {
id = "pl.tlinkowski.tlinkowski-superpom"
implementationClass = "pl.tlinkowski.TLinkowskiSuperpomPlugin"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2019 Tomasz Linkowski.
*
* 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
*
* http://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.
*/

package pl.tlinkowski

import org.gradle.api.Plugin
import org.gradle.api.Project

/**
* Applies the concept of a Gradle SuperPOM for all projects of Tomasz Linkowski.
*
* See: [http://andresalmiray.com/the-gradle-superpom/]
*
* @author Tomasz Linkowski
*/
class TLinkowskiSuperpomPlugin : Plugin<Project> {

override fun apply(project: Project) {

}
}

0 comments on commit 026dc1e

Please sign in to comment.