Skip to content

Commit

Permalink
plugin now loads itself in its build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Joaquimmnetto committed Jun 17, 2021
1 parent 64fcc65 commit d74ea3c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
18 changes: 15 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,24 @@
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'gradle.plugin.net.wooga.gradle:atlas-github:2.+'
classpath 'com.gradle.publish:plugin-publish-plugin:0.14.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:[2,3)'
classpath 'gradle.plugin.net.wooga.gradle:atlas-GithubReleaseNotes:[0.1, 0.2)'
classpath 'org.ajoberstar.grgit:grgit-gradle:4.1.0'
classpath 'gradle.plugin.net.wooga.gradle:atlas-version:0.1.0-rc.8'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0'
}
}

plugins {
id 'net.wooga.plugins' version '2.2.0-rc.2'
}
apply plugin: new GroovyScriptEngine(
[file('src/main/groovy').absolutePath,
file('src/main/resources').absolutePath].toArray(new String[2]),
this.class.classLoader
).loadScriptByName('wooga/gradle/plugins/PluginsPlugin.groovy')

group 'net.wooga.gradle'
description = 'Plugin for wooga gradle plugin development.'
Expand Down
2 changes: 0 additions & 2 deletions src/main/groovy/wooga/gradle/plugins/PluginsPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ import wooga.gradle.github.publish.tasks.GithubPublish
import wooga.gradle.githubReleaseNotes.GithubReleaseNotesPlugin
import wooga.gradle.githubReleaseNotes.tasks.GenerateReleaseNotes
import wooga.gradle.plugins.releasenotes.ReleaseNotesStrategy
import wooga.gradle.plugins.sonarqube.PropertyFactory
import wooga.gradle.plugins.sonarqube.PropertyFactories
import wooga.gradle.plugins.sonarqube.RepositoryInfo
import wooga.gradle.plugins.sonarqube.SonarQubeConfiguration
import wooga.gradle.version.VersionCodeScheme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ class PluginsPluginSpec extends ProjectSpec {
SonarQubeTask sonarTask = project.tasks.getByName(SonarQubeExtension.SONARQUBE_TASK_NAME)
def properties = sonarTask.getProperties()

//sonar.host.url is not here as CI always will have SONAR_HOST set, so it is never null there.
properties["sonar.login"] == null
properties["sonar.host.url"] == null
properties["sonar.projectKey"] == "${ghCompany}_${ghRepoName}"
properties["sonar.projectName"] == ghRepoName
properties["sonar.sources"] == srcFolder.absolutePath
Expand Down

0 comments on commit d74ea3c

Please sign in to comment.