When trying to add the org.ajoberstar.grgit plugin into my gradle build, I get the following error:
Plugin [id: 'org.ajoberstar.grgit', version: '2.3.0'] was not found in any of
the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact
'org.ajoberstar.grgit:org.ajoberstar.grgit.gradle.plugin:2.3.0')
Searched in the following repositories:
Gradle Central Plugin Repository
Here is my code:
import org.ajoberstar.grgit.*
buildscript {
dependencies {
classpath 'org.ajoberstar:grgit:2.3.0'
}
}
plugins {
id "org.sonarqube" version "2.6"
id "idea"
id "org.ajoberstar.grgit" version "2.3.0"
}
// ...
Any idea on how to solve this? Can I somehow manually download the plugin and put it into the cache?
You need to either use:
plugins {
id "org.ajoberstar.grgit" version "2.3.0"
}
or:
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'org.ajoberstar:grgit:2.3.0'
}
}
apply plugin: 'org.ajoberstar.grgit'
I am not entirely sure why, but it started working all of a sudden. Here is what I tried:
After that it magically worked. I am pretty sure it has something to do with the companies proxies and some custom scripts for it (my best guess is that it didn't handle the space character in the JAVA_HOME variable well).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With