gpt4 book ai didi

gradle - 通过 gradle 将 zip(自定义 gradle 包装器)上传到 artifactory

转载 作者:行者123 更新时间:2023-12-03 06:03:35 44 4
gpt4 key购买 nike

我想将我的自定义 gradle 包装器上传到 artifactory。
我试过:

  • 来自 gradle 'base' 插件的标准上传任务
  • 神器gradle插件

  • 我总是有一些布局,例如/group/name/revision/[name]-[revision].zip
    我需要的很简单 repo/name-revision.zip ,例如在 gradle-distribution 存储库中: https://services.gradle.org/distributions

    我正在尝试使用“Gradle”布局将 zip 上传到 gradle-local pregenerated artifactory repo

    我阅读了有关 Ivy 布局等的信息,但对于如此简单的任务来说,一切似乎都过于复杂了。

    有什么建议吗?

    最佳答案

    使用 gradle-3.1 这对我有用:
    gradle.properties

    artifactory = http://yourserver/artifactory/reponame
    artifactoryUser = username
    artifactoryPassword = the-encryped-password
    build.gradle
    apply plugin: 'maven'
    apply plugin: 'distribution'

    group = 'foo.bar'
    version = '0.5-SNAPSHOT'

    // not needed since we have standard layout src/main/dist
    // distributions { main { contents { from { ... } } } }

    uploadArchives {
    repositories {
    mavenDeployer {
    repository(url: artifactory) {
    authentication(userName: artifactoryUser, password: artifactoryPassword)
    }
    snapshotRepository(url: artifactory) {
    authentication(userName: artifactoryUser, password: artifactoryPassword)
    }
    }
    }
    }

    $> tree src
    src
    └── main
    └── dist
    ├── bla.txt
    └── blub.txt

    $> ./gradlew uploadArchives
    :distTar
    :distZip
    :uploadArchives

    BUILD SUCCESSFUL

    Total time: 1.332 secs

    然后可以在 artifactory 中找到 zip

    关于gradle - 通过 gradle 将 zip(自定义 gradle 包装器)上传到 artifactory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40173136/

    44 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com