当前位置: 首页 > news >正文

网站到期请续费西安百度推广网站建设

网站到期请续费,西安百度推广网站建设,以前做弹幕现在的电影网站,如何创建微信公众号平台本文适用: 不知道什么是项目构建,可以了解下Ant,Maven,Gradle的区别。知道什么是项目构建,了解Ant,Maven,可以看到Gradle是怎么做的。知道什么是项目构建,了解Ant,Maven&…

本文适用:

  1. 不知道什么是项目构建,可以了解下AntMavenGradle的区别。
  2. 知道什么是项目构建,了解AntMaven,可以看到Gradle是怎么做的。
  3. 知道什么是项目构建,了解AntMavenGradle,可以帮本文审校下,多谢。

文章目录

    • Gradle是什么
    • Gradle项目结构
    • 依赖关系
      • 新旧版本
      • 作用
    • 指定Java版本

Gradle是什么

Ant
Ant是用Java编写的,可以用于包含JavaCC++等多种语言的构建工具,其中的典型优势是支持跨平台。

Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other. The main known usage of Ant is the build of Java applications. Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications. Ant can also be used effectively to build non Java applications, for instance C or C++ applications. More generally, Ant can be used to pilot any type of process which can be described in terms of targets and tasks.
Why another build tool

Maven
Maven使用项目对象模型(POM)来管理项目依赖,根据约定胜于配置(convention over configuration)理念,采取依赖坐标和冲突仲裁能多种方式来管理依赖和解决冲突,广泛应用于多种项目。

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information.

Gradle
Gradle 构建工具是一款快速、可靠、适应性强的开源构建自动化工具,拥有优雅、可扩展的声明式构建语言。最典型特征是可扩展。

Gradle is the open source build system of choice for Java, Android, and Kotlin developers. From mobile apps to microservices, from small startups to big enterprises, it helps teams deliver better software, faster.
Why Gradle?

Gradle项目结构

Gradle project structure
在这里插入图片描述

  1. Gradle directory to store wrapper files and more
  2. Gradle version catalog for dependency management
  3. Gradle wrapper scripts
  4. Gradle settings file to define a root project name and subprojects
  5. Gradle build scripts of the two subprojects - subproject-a and subproject-b
  6. Source code and/or additional files for the projects

settings.gradle:判断有哪些项目需要初始化,加载所有需要初始化的项目的。可以类比maven中的module管理。
build.gradle: 为每个项目创建project对象,可类比maven中的pom.xml。

依赖关系

新旧版本

compile依赖关系已被弃用,被implementationapi替代;
providedcompile only替代;
apkruntime only替代;
api跟2.x版本的compile完全相同。

作用

  • compileOnly:只在编译时有效,不会参与打包 可以在自己的moudle中使用该方式依赖一些比如com.android.support,gson这些使用者常用的库,避免冲突。
  • runtimeOnly:只在生成apk的时候参与打包,编译时不会参与,很少用。
  • testImplementation:只在单元测试代码的编译以及最终打包测试apk时有效。
  • debugImplementation:只在debug模式的编译和最终的debug apk打包时有效
  • releaseImplementation:仅仅针对Release 模式的编译和最终的Release apk打包。
  • api:会把依赖库传给使用者,使用者的项目External Libraries 中能够看的见。可以在其他module使用,会参与打包。
  • implementation:当其他模块依赖此模块时,此模块使用implementation声明的依赖包只限于模块内部使用,不允许其他模块使用。

指定Java版本

project的java运行版本,不是本地java版本

以下是如何在build.gradle文件中配置:
应用Java插件

plugins { id 'java' 
}

指定版本

sourceCompatibility = '11' // 源代码兼容版本 
targetCompatibility = '11' // 目标字节码兼容版本
http://www.ritt.cn/news/19250.html

相关文章:

  • 长春品牌网站建设公司免费发广告的软件
  • 响应式网站的缺点如何在网上推广产品
  • 嘉兴做网站多少钱百度建一个网站多少钱
  • 无锡网站建设人员应用商店下载
  • 饰品网站设计方案汕头seo外包机构
  • wordpress post grid百度关键词相关性优化软件
  • 白石洲附近做网站公司网站宣传文案
  • 做外贸需要有自己的网站吗软文发稿平台有哪些
  • 北京搬家公司哪家好站长工具seo排名查询
  • 发簪做的比较好的网站百度云链接
  • 全新域名请收藏seo人员工作内容
  • 网站开发 职位描述资源网站优化排名软件公司
  • 网站建设小程序常用的搜索引擎
  • 莱州双语网站论文收录网站有哪些
  • 精品成品冈站源码免费北京seo运营推广
  • 自己做投票网站怎么弄西安危机公关公司
  • 汕头智能模板建站网站优化费用报价明细
  • 重庆网站设计案例短视频推广
  • 辽宁建设工程信息网大连苏州seo排名公司
  • 天津网站建设索王道下拉上海网站设计公司
  • 兰州网站建设推广沈阳专业seo
  • 泰安做网站建设的北京seo外包
  • 网站备案在哪儿seo排名规则
  • 北京网站开发哪家好薇微博推广方式
  • 绵阳市建设工程质监站网站app怎么开发出来的
  • 在线看免费电影网站手机如何制作网站教程
  • 想要自己做一个网站怎么做百度识图识别
  • 做服装外单的网站有哪些如何对网站进行推广
  • 免费学做网站软文营销的作用有哪些
  • 织梦网站入侵方法线上营销渠道主要有哪些