From 400ad1f37a5821f8d665507c1771d7d10774704c Mon Sep 17 00:00:00 2001 From: Puneet Behl Date: Wed, 11 Jan 2023 10:06:12 +0530 Subject: [PATCH] Cleanup project for publishing a release --- build.gradle | 63 +++++++------------ docs/build.gradle | 6 +- gradle.properties | 4 +- .../plugin/GormGraphqlGrailsPlugin.groovy | 36 +++-------- 4 files changed, 38 insertions(+), 71 deletions(-) diff --git a/build.gradle b/build.gradle index e314768e..163cf949 100644 --- a/build.gradle +++ b/build.gradle @@ -5,8 +5,7 @@ buildscript { dependencies { classpath "org.grails:grails-gradle-plugin:$grailsVersion" classpath "org.grails:grails-docs:${project.ext.properties.grailsDocsVersion ?: grailsVersion}" - classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' - classpath 'io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1' + classpath "io.github.gradle-nexus:publish-plugin:1.1.0" } } @@ -18,7 +17,7 @@ repositories { version project.projectVersion ext { - commonBuild = 'https://raw.githubusercontent.com/grails/grails-common-build/9531dd5e6d774b86e2d8220aff3bcec3add43320' + commonBuild = 'https://raw.githubusercontent.com/grails/grails-common-build/master' } subprojects { @@ -35,56 +34,42 @@ subprojects { maven { url "https://repo.grails.org/grails/core" } } - if(project.name.startsWith("examples-")) { - if(project.name.startsWith("examples-grails-")) { - apply plugin:"org.grails.grails-web" + tasks.withType(GroovyCompile).configureEach { + configure(groovyOptions) { + forkOptions.jvmArgs = ['-Xmx1024m'] } + } - tasks.withType(Test) { - testLogging { - events "failed" - exceptionFormat "full" - } + tasks.withType(Test).configureEach { + testLogging { + events "failed" + exceptionFormat "full" + showStandardStreams true + } + } + + if (project.name.startsWith("examples-")) { + if (project.name.startsWith("examples-grails-")) { + apply plugin: "org.grails.grails-web" } return } - if(isGrailsPlugin) { + if (isGrailsPlugin) { group "org.grails.plugins" - } - else { + } else { group "org.grails" } - if(project.name.endsWith('docs')) { - apply from:"${commonBuild}/common-docs.gradle" - return - } - if (isGrailsPlugin) { - apply plugin:"org.grails.grails-plugin" + apply plugin: "org.grails.grails-plugin" + } else { + apply from: "${commonBuild}/common-project.gradle" } - else { - apply from:"${commonBuild}/common-project.gradle" - } - - apply from:"${commonBuild}/common-publishing.gradle" dependencies { testCompile "org.codehaus.groovy:groovy-test:$groovyVersion" } +} - tasks.withType(GroovyCompile) { - configure(groovyOptions) { - forkOptions.jvmArgs = ['-Xmx1024m'] - } - } - - tasks.withType(Test) { - testLogging { - events "failed" - exceptionFormat "full" - showStandardStreams true - } - } -} \ No newline at end of file +apply from: "${commonBuild}/common-publishing.gradle" \ No newline at end of file diff --git a/docs/build.gradle b/docs/build.gradle index b9b45208..8ee14099 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -1,7 +1,11 @@ +/* publishGuide { sourceRepo = "https://github.com/${githubSlug}/edit/${githubBranch}/docs/src/main/docs" } +*/ dependencies { documentation "org.codehaus.groovy:groovy-groovydoc:$groovyVersion" -} \ No newline at end of file +} + +apply from: "${commonBuild}/common-docs.gradle" \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index d0864e56..9e8fe855 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,12 +4,12 @@ projectVersion=2.0.1-SNAPSHOT projectDesc=Generates a GraphQL schema based on entities in GORM projectUrl=https://github.com/grails/gorm-graphql githubSlug=grails/gorm-graphql -githubBranch=master +githubBranch=2.0.x developers=James Kleeh gormVersion=7.0.5.RELEASE gormHibernateVersion=7.0.3.RELEASE gormMongoDbVersion=7.0.0.RELEASE -grailsVersion=4.0.2 +grailsVersion=4.1.0 grailsDocsVersion=3.3.2 groovyVersion=2.5.14 slf4jVersion=1.7.22 diff --git a/plugin/src/main/groovy/org/grails/gorm/graphql/plugin/GormGraphqlGrailsPlugin.groovy b/plugin/src/main/groovy/org/grails/gorm/graphql/plugin/GormGraphqlGrailsPlugin.groovy index 9dbdbc5a..946b257e 100644 --- a/plugin/src/main/groovy/org/grails/gorm/graphql/plugin/GormGraphqlGrailsPlugin.groovy +++ b/plugin/src/main/groovy/org/grails/gorm/graphql/plugin/GormGraphqlGrailsPlugin.groovy @@ -19,38 +19,16 @@ import org.grails.gorm.graphql.types.DefaultGraphQLTypeManager class GormGraphqlGrailsPlugin extends Plugin { - // the version or versions of Grails the plugin is designed for - def grailsVersion = "4.0.0.BUILD-SNAPSHOT > *" - - - // TODO Fill in these fields - def title = "Gorm Graphql" // Headline display name of the plugin + def grailsVersion = "4.0.0 > *" + def title = "Gorm GraphQL" def author = "James Kleeh" def authorEmail = "james.kleeh@gmail.com" - def description = '''\ -Brief summary/description of the plugin. -''' def profiles = ['web'] - - // URL to the plugin's documentation - def documentation = "http://grails.org/plugin/gorm-graphql" - - // Extra (optional) plugin metadata - - // License: one of 'APACHE', 'GPL2', 'GPL3' -// def license = "APACHE" - - // Details of company behind the plugin (if there is one) -// def organization = [ name: "My Company", url: "http://www.my-company.com/" ] - - // Any additional developers beyond the author specified above. -// def developers = [ [ name: "Joe Bloggs", email: "joe@bloggs.net" ]] - - // Location of the plugin's issue tracker. -// def issueManagement = [ system: "JIRA", url: "http://jira.grails.org/browse/GPMYPLUGIN" ] - - // Online location of the plugin's browseable source code. -// def scm = [ url: "http://svn.codehaus.org/grails-plugins/" ] + def documentation = "https://plugins.grails.org/plugin/gorm-graphql" + def license = "APACHE" + def developers = [ [ name: "Puneet Behl", email: "behlp@objectcomputing.com" ]] + def issueManagement = [ system: "GitHub", url: "https://github.com/grails/gorm-graphql/issues" ] + def scm = [ url: "https://github.com/grails/gorm-graphql/" ] public static MimeType GRAPHQL_MIME = new MimeType('application/graphql')