Amper Amper Amper!
今天天气不好,送孩子上少年宫之后就在茶馆里坐着。突然看到一个帖子:Project configuration with Amper,看得心情大好。
用Kotlin也有个大概几年的时间,开发了几个小工具,感觉很是不错。但是配置起来确实是个大问题,gradle那一套挺好用,功能非常强大,整起来心智负担不是一般大。前面都写了几个笔记,自己用的时候还要经常去翻,配置里面的一些细节,还要去拷贝代码。而且gradle到gradle.kts,也是一个麻烦的东西。Maven用得比较少,以前读书的时候XML发一篇小文章把胃口搞坏了。Ant用过几次,Java年代,感觉不太喜欢。
看到Amper之后,立马准备试一下,终于可以现代化一次。Java社区和新的Kotlin社区,可真是慢慢都成了守旧势力。所有新的语言都提供了非常好用的项目管理、依赖管理、构建工具一体化的方案,唯独Java体系还在修修补补。终于,守旧势力被冲了,Amper出现了。
Amper是什么?
Amper是JetBrains公司开发的一个项目配置工具,用于Kotlin Multiplatform项目。它的目标是简化项目配置。这句废话……
我最关心的就是Amper可以用独立运行的方式来管理项目。
(base) PS C:\prjs\amper> ./amper --help
Usage: amper [<options>] <command> [<args>]...
Options:
--version Show the version and exit
--root=<path> Amper project root
--log-level=(debug|info|warn|error|off) Console logging level (default: INFO)
--shared-caches-root=<path> Path to the cache directory shared between all Amper projects (default:
C:\Users\User\AppData\Local\Amper)
--async-profiler Profile Amper with Async Profiler
--build-output=<path> Root directory for build outputs. By default, this is the 'build' directory
under the project root.
-h, --help Show this message and exit
Commands:
build Compile and link all code in the project
clean Remove the project's build output and caches
clean-shared-caches Remove the Amper caches that are shared between projects
init Initialize a new Amper project based on a template
modules List all modules in the project
publish Publish modules to a repository
run Run your application
settings Print the effective Amper settings of each module
task Execute any task from the task graph
tasks List all tasks in the project and their dependencies
test Run tests in the pr