更改 gradle 插件的基础工件

问题描述 投票:0回答:1

我们使用

构建了一个gradle插件
id("org.jetbrains.intellij") version "1.15.0" 
id("org.springframework.boot") version "2.7.16" 
id("io.spring.dependency-management") version "1.0.15.RELEASE" 

这是由中央 Maven 获取的,但我们希望它来自我们提供的工件或我下载 pom.xml 的本地系统路径。任何线索将不胜感激。

我们尝试使用以下代码但无济于事:

buildscript {
  repositories {
    maven {
      url=uri("url")
    }
  }
}
gradle plugins artifactory
1个回答
0
投票

Gradle 在存储库中搜索

plugins
块内定义的插件,这些插件是在
pluginManagement
文件(
文档
)的 settings.gradle.kts 块中定义的。

例如:

// settings.gradle.kts

pluginManagement {
    repositories {
        // define any other repositories you like, eg
        maven { // details of own Maven repo }
        gradlePluginPortal() // The default setting, but must be re-specified if using this block if you still want to use it
    }
}
© www.soinside.com 2019 - 2024. All rights reserved.