添加外部瓶子在gradle

栏目: 编程工具 · 发布时间: 5年前

内容简介:http://stackoverflow.com/questions/22734314/add-external-jar-in-gradle

如何在毕业生中添加外部库?我的build.gradle包含:

buildscript {
    repositories {
        mavenCentral()
        maven {
            name = "forge"
            url = "http://files.minecraftforge.net/maven"
        }
        maven {
            name = "sonatype"
            url = "https://oss.sonatype.org/content/repositories/snapshots/"
        }
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:1.1-SNAPSHOT'
    }
}

我的根文件夹是/ FORGE /.我想添加/FORGE/build/libs/spigot.jar作为依赖.

documentation

年所述:

dependencies {
    compile files('libs/spigot.jar')
}

以上将把libs / spigot.jar文件添加到编译配置中.您当然可以将其添加到任何其他配置(运行时等).

请注意,使用build / lib是一个非常糟糕的主意,因为一旦您执行gradle clean,整个构建目录将被删除.构建目录用于存储由构建生成的工件.

http://stackoverflow.com/questions/22734314/add-external-jar-in-gradle


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Mobilizing Web Sites

Mobilizing Web Sites

Layon, Kristofer / 2011-12 / 266.00元

Everyone has been talking about the mobile web in recent years, and more of us are browsing the web on smartphones and similar devices than ever before. But most of what we are viewing has not yet bee......一起来看看 《Mobilizing Web Sites》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具