- Что пошло не так:
Плагин [ id: 'com.google.protobuf', версия: '0.8.13', apply: false] не найден ни в одном из следующих источников:
- Плагины Gradle Core (плагин не находится в пространстве имен «org.gradle»)
- Репозитории плагинов (не удалось разрешить артефакт плагина «com.google.protobuf:com» .google.protobuf.gradle.plugin:0.8.13')
Искался в следующих репозиториях:
Центральный репозиторий плагинов Gradle
MavenRepo
Google
maven(https: //jitpack.io)
maven2(https://plugins.gradle.org/m2/)
Код: Выделить всё
buildscript {
ext {
spotbugsVersion = '4.0.2'
toolVersion = '4.0.2'
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
}
plugins {
id 'java'
id 'com.google.protobuf' version '0.8.13' apply false
id 'idea'
id 'com.github.spotbugs' version '6.0.7' apply false
id 'com.gradle.enterprise' version '3.14.1' apply false // Example of adding the missing plugin
}
allprojects {
version = '1.0'
repositories {
mavenCentral()
google()
gradlePluginPortal()
maven { url = uri("https://jitpack.io")}
maven { url = uri("https://plugins.gradle.org/m2/") } // Ensure this line is present
}
apply plugin: 'idea'
idea {
module {
outputDir = file('build/classes/java/main')
testOutputDir = file('build/classes/java/test')
}
}
}
def javaProjects() {
return subprojects.findAll();
}
configure(javaProjects()) {
apply plugin: 'java-library'
sourceCompatibility = 1.8
targetCompatibility = 1.8
defaultTasks 'jar'
apply from: file("${rootProject.projectDir}/tools/gradle/formatter.gradle")
apply from: file("${rootProject.projectDir}/tools/gradle/check.gradle")
apply from: file("${rootProject.projectDir}/tools/gradle/spotbugs.gradle")
test {
useTestNG() {
suites 'testng.xml'
}
testLogging {
showStandardStreams = true
events "passed", "skipped", "failed", "standardOut", "standardError"
}
}
test.finalizedBy(project.tasks.jacocoTestReport)
compileJava {
options.compilerArgs
Подробнее здесь: [url]https://stackoverflow.com/questions/79013156/fail-to-apply-plugin-com-google-protobuf[/url]