Gradle常用命令记录
Gradle常用命令记录:
运行gradle help --task someTask
来显示帮助,如:
1 | ./gradlew help --task test |
clean
1 | ./gradlew clean |
build
1 | ./gradlew build |
test
1 | ./gradlew test |
排除指定的task--exclude-task
1 | ./gradlew clean build --exclude-task test |
多模块指定模块运行task
1 | ./gradlew :my-subproject:taskName |
测试失败继续执行
1 | ./gradlew test --continue |
检查,会执行test和linting
1 | ./gradlew check |
显示当前的项目层次
1 | ./gradlew project |
列出所有的task
1 | ./gradlew tasks |
列出项目所有的依赖:
1 | ./gradlew dependencies |
去官网查看更多