我的工程gradle引入外部第三方工程代码

本文详细介绍了如何在Gradle工程中引入并管理外部的第三方工程代码,包括设置文件如`setting.gradle`、各模块的`build.gradle`配置以及`gradle-wrapper.properties`的正确写法,旨在帮助开发者理解如何在自己的项目中正确集成和构建依赖。
摘要由CSDN通过智能技术生成

我的工程setting.gradle

include 'desktop', 'android', 'ios', 'core'
include 'lib_core'
project(':lib_core').projectDir = new File(settingsDir, "../../df_lib_x/lib_core")
include 'lib_android'
project(':lib_android').projectDir = new File(settingsDir, "../../df_lib_x/lib_android")
includeFlat 'dy_cike_xcf', 'dy_cike_cocostudio'
 

我的工程根目录build.gradle

buildscript {
    repositories {
        mavenLocal()
//        mavenCentral()
        maven { url "http://repo2.maven.org/maven2/" }
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
        classpath 'org.robovm:robovm-gradle-plugin:1.12.0'
    }
}

allprojects {
    apply plugin: "eclipse"
    apply plugin: "idea"

    version = '1.0'
    ext {
        appName = "dy_cike_cikechuanshuo_init_init"
        gdxVersion = '1.8.0'
        roboVMVersion = '1.12.0'
        box2DLightsVersion = '1.4'
        ashleyVersion = '1.7.0'
        aiVersion = '1.7.0'
    }

    repositories {
        mavenLocal()
//        mavenCentral()

        maven { url "http://repo2.maven.org/maven2/" }
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
    }
}


project(":desktop") {
    apply plugin: "java"

    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
        compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
        compile "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-desktop"
        compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
        compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
    }
}

project(":android") {
    apply plugin: "android"

    configurations { natives }

    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
        compile "com.badlogicgames.g
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值