Skip to content

Commit

Permalink
remove unused classes, refactor JavaPublish to simplify, depend on ya…
Browse files Browse the repository at this point in the history
…kworks:commons (#13)
  • Loading branch information
basejump authored Oct 26, 2021
1 parent 058e87b commit 3cc80e2
Show file tree
Hide file tree
Showing 29 changed files with 260 additions and 1,527 deletions.
30 changes: 22 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,24 @@ buildscript {
}
dependencies {
classpath "org.yakworks:gradle-plugins:$vShipyak"
classpath "io.github.gradle-nexus:publish-plugin:1.1.0"
}
}

plugins {
id "com.dorongold.task-tree" version "1.5"
id 'groovy'
id 'java-gradle-plugin'
// id 'maven-publish'
id "com.gradle.plugin-publish" version "0.16.0"
id "java-gradle-plugin"
}

apply plugin: 'signing'
apply plugin: "io.github.gradle-nexus.publish-plugin"
apply plugin: 'yakworks.gradle-plugin'

group "org.yakworks"

repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
Expand All @@ -31,6 +38,7 @@ dependencies {
implementation gradleApi()
implementation localGroovy()

implementation "org.yakworks:commons:$vYakworksCommon"
implementation "com.diffplug.spotless:spotless-plugin-gradle:$vSpotless"
implementation "com.adarshr:gradle-test-logger-plugin:$vTestLogger"
implementation "org.yaml:snakeyaml:$vSnakeyaml"
Expand All @@ -46,6 +54,17 @@ dependencies {
testImplementation gradleTestKit()
}

signing {
useGpgCmd()
sign publishing.publications.javaLibrary
}

nexusPublishing {
repositories {
sonatype()
}
}

//if its a CI we need to get the gradle plugin credentials
if(!findProperty('gradle.publish.key')) ext['gradle.publish.key'] = System.getenv('GRADLE_PUBLISH_KEY')
if(!findProperty('gradle.publish.secret')) ext['gradle.publish.secret'] = System.getenv('GRADLE_PUBLISH_SECRET')
Expand All @@ -54,6 +73,7 @@ def defTags = ['grails', 'groovy', 'shipkit', 'spotless', 'circleCI', 'continuou
'mkdocs', 'markdown', 'documentation']

gradlePlugin {
automatedPublishing = false
plugins {
defaultsPlugin {
id = 'yakworks.defaults'
Expand Down Expand Up @@ -118,13 +138,6 @@ gradlePlugin {
description = 'Yakworks Groovydoc merges together all the groovydocs for shippable libs in a project'
//tags = defTags
}
// shipkitPlugin { //DEPRECATED
// id = 'yakworks.shipkit'
// implementationClass = 'yakworks.gradle.shipkit.ShipkitPlugin'
// displayName = 'DEPRECATED'
// description = 'DEPRECATED use yakworks.shipyak'
// //tags = defTags
// }
yamlConfigPlugin {
id = 'yakworks.yaml-config'
implementationClass = 'yakworks.gradle.config.YamlConfigPlugin'
Expand All @@ -141,6 +154,7 @@ pluginBundle {
//description = 'Plugin providing opinionated defaults and shipkit setup for Groovy, Grails and Gradle library/plugin projects. ' +
// 'Enables hooks for automated releases and versioning and tags with CircleCI. Yaml config properties'
tags = defTags

mavenCoordinates {
groupId = project.group
artifactId = project.name
Expand Down
6 changes: 6 additions & 0 deletions build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

project:
# this is needed for url in pom for jar lib, doesnt pick up defaults from git
fullName: yakworks/gradle-plugins

bot:
email: 9cibot@9ci.com
user: 9cibot
Expand All @@ -16,4 +21,5 @@ team:
developers: ['basejump: Joshua Burnett']

maven:
# repoUrl: https://oss.sonatype.org/service/local/staging/deploy/maven2
snapshotUrl: http://repo.9ci.com/oss-snapshots
6 changes: 5 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
groovyVersion=2.5.14
signing.gnupg.keyName=302AAEFA
# this turns off the sha256 and sha512 files that get published for now
systemProp.org.gradle.internal.publish.checksums.insecure=true

vShipyak=2.6.3
vYakworksCommon=7.0.8-v.34
vShipyak=2.6.5
vSpotless=5.12.5
vTestLogger=2.1.1
vSnakeyaml=1.27
Expand Down
8 changes: 5 additions & 3 deletions src/main/groovy/yakworks/commons/ConfigMap.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import groovy.transform.EqualsAndHashCode

import org.codehaus.groovy.runtime.DefaultGroovyMethods

import yakworks.commons.map.Maps

/**
* Copied from org.grails.config.ConfigMap so we can use it as a gradle plugin here
* Copied from org.grails.config.NavigableMap so we can use it as a gradle plugin here
* This is like groovy's ConfigObject but better.
*/
@EqualsAndHashCode
Expand Down Expand Up @@ -249,8 +251,8 @@ class ConfigMap implements Map<String, Object>, Cloneable {
void addToBinding(Map vars){
bindingMap.putAll(vars)
}
void addToBinding(String var, Object val){
bindingMap.put(var, val)
void addToBinding(String varName, Object val){
bindingMap.put(varName, val)
}

/**
Expand Down
67 changes: 0 additions & 67 deletions src/main/groovy/yakworks/commons/Maps.groovy

This file was deleted.

Loading

0 comments on commit 3cc80e2

Please sign in to comment.