plugins - Gradle Configuration of pluginRepository -


i trying simple gradle project (the 1 created eclipse automatically) static code analysis made sonar run on our continuous integration. our ci server behind proxy , have access gradle plugin repository on internal nexus server.

as described in userguide have added following settings.gradle

pluginrepositories {   maven {     url 'http://link.to.my.nexus'   }   gradlepluginportal() }  rootproject.name = 'gradletestproject' 

my build.gradle looks this:

plugins {   id "org.sonarqube" version "2.0.1" }  apply plugin: 'java'  repositories {     mavenlocal()     mavencentral() }  dependencies {     compile 'org.slf4j:slf4j-api:1.7.21'      testcompile 'junit:junit:4.12' } 

when run on jenkins, following error message:

failure: build failed exception.  * where: settings file '/opt/hudson/jobs/gradletestproject/workspace/settings.gradle' line: 1  * went wrong: problem occurred evaluating settings 'workspace'. > not find method pluginrepositories() arguments [settings_20tc2o9xuj82hi1fvpe4wvcvt$_run_closure1@52b56c40] on settings 'workspace'. 

i have looked @ other examples in web. same way described.

btw: using gradle 2.12

i'm in version 4.0.1.

i had same error, found question without answer , found , tried in settings.gradle , works.

pluginmanagement {     repositories {         gradlepluginportal()      } } 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -