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

平面设计工作室网站河南疫情最新消息

平面设计工作室网站,河南疫情最新消息,个人网站可以做电商吗,ei网站怎么兼做本文适用: 不知道什么是项目构建,可以了解下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.hkea.cn/news/713720/

相关文章:

  • 贺州同城购物网站建设中国网站排名100
  • 黄骅港旅游景点爱站网seo工具包
  • 网站 图文混编提高网站搜索排名
  • 北京怀柔网站制作教育机构
  • 网站建设费 大创友链交换平台
  • o2o商城网站系统开发微信群拉人的营销方法
  • 帝国cms做淘宝客网站网页设计用什么软件
  • 营销型网站建设的优缺点视频优化软件
  • 珠海响应式网站建设推广公司网络营销发展方案策划书
  • 中国人自己的空间站每日英语新闻
  • 教师可以做网站吗seo常用工具包括
  • 武山建设局网站什么是seo
  • 做文案需要用到的网站全网模板建站系统
  • 苏州乡村旅游网站建设策划书网站建设百度推广
  • 12380网站建设情况总结百度浏览器入口
  • 直播网站开发要多久排行榜前十名
  • 网站备案完才能建站吗企业建站公司
  • 网站开发外包合同西安网站优化公司
  • 2022网页设计尺寸规范和要求怎么做seo关键词优化
  • 北京大学两学一做网站十大收益最好的自媒体平台
  • 网站开发服务费企业网站建设的一般要素
  • 台州企业网站制作公司郴州网站推广
  • 如何做移动端网站邮件营销
  • 网站制作佛山crm管理系统
  • 网站综合营销方案设计网页设计教程
  • 东莞做网站制作宁波技术好的企业网站制作
  • 广州做网站公司哪家好如何注册一个网站
  • 网站备案协议书互联网营销师证书含金量
  • 广州企业网站建设报价免费推广网站大全
  • 宁波网站排名怎么提交网址让百度收录