@@ -6,11 +6,85 @@ toc: content
66# smt
77
88| CI | Codecov | Scaladex | Jetbrains Plugin |
9- | --------------- | ----------------------------------------- | ------------------------------------------------------------- | --------------------------------------------- |
10- | ![ CI] [ Badge-CI ] | [ ![ codecov] [ Badge-Codecov ]] [ Link-Codecov ] | [ ![ smt Scala version support] [ Badge-Scaladex ]] [ Link-Scaladex ] | [ ![ Version] [ Badge-Jetbrains ]] [ Link-Jetbrains ] |
9+ | ----------------- | ------------------------------------------- | --------------------------------------------------------------- | ----------------------------------------------- |
10+ | ![ CI] [ Badge-CI ] | [ ![ codecov] [ Badge-Codecov ]] [ Link-Codecov ] | [ ![ smt Scala version support] [ Badge-Scaladex ]] [ Link-Scaladex ] | [ ![ Version] [ Badge-Jetbrains ]] [ Link-Jetbrains ] |
1111
12- ## Environment
12+
13+ # 环境
1314
1415- Scala 2.11.12
1516- Scala 2.12.16
16- - Scala 2.13.8
17+ - Scala 2.13.8
18+ - Scala3版本 [ bitlap/rolls] ( https://github.com/bitlap/rolls )
19+
20+ # 文档
21+
22+ [ 详细文档 https://bitlap.org/lab/smt ] ( https://bitlap.org/lab/smt )
23+
24+ # 如何使用
25+
26+ ## annotations
27+
28+ - ` @toString `
29+ - ` @builder `
30+ - ` @apply `
31+ - ` @constructor `
32+ - ` @equalsAndHashCode `
33+ - ` @javaCompatible `
34+
35+ > Intellij插件 ` Scala-Macro-Tools ` 。
36+
37+ ``` scala
38+ " org.bitlap" %% " smt-annotations" % " <VERSION>"
39+ ```
40+
41+ > 在gradle,maven中,通常` smt-annotations ` 被替换为` smt-annotations_2.12 ` ,其中,` 2.12 ` 表示Scala版本号。` smt-annotations ` 改名自` smt-tools `
42+
43+ 在` scala 2.13.x ` 版本中,需增加scalac参数` -Ymacro-annotations ` 。
44+
45+ ## common
46+
47+ - 通用的宏操作API的封装。
48+ - 对象转换器(零依赖,类型安全)。
49+ - JDBC ` ResultSet ` 转换器。
50+
51+ ``` scala
52+ " org.bitlap" %% " smt-common" % " <VERSION>"
53+ ```
54+
55+ 该库已发布到[ https://s01.oss.sonatype.org/ ] ( https://s01.oss.sonatype.org/ ) 仓库,请使用最新版本。仅将本库导入构建系统(例如gradle、sbt)是不够的。不同Scala版本还需要相应配置:
56+
57+ | Scala 2.11 | Scala 2.12 | Scala 2.13 |
58+ | ----------------------| ----------------------| --------------------------------|
59+ | 导入 macro paradise 插件 | 导入 macro paradise 插件 | 开启 编译器标记 ` -Ymacro-annotations ` |
60+
61+ ``` scala
62+ // 导入 macro paradise 插件
63+ // <your-scala-version> 必须是Scala版本号的完整编号,如2.12.13,而不是2.12。
64+ addCompilerPlugin(" org.scalamacros" % " paradise_<your-scala-version>" % " <plugin-version>" )
65+ ```
66+
67+ 如果没有仓库,可以手动添加:
68+ ```
69+ ThisBuild / resolvers ++= Seq(
70+ "Sonatype OSS Snapshots" at "https://s01.oss.sonatype.org/content/repositories/snapshots",
71+ "Sonatype OSS Releases" at "https://s01.oss.sonatype.org/content/repositories/releases"
72+ )
73+ ```
74+
75+ # 特别感谢
76+
77+ <img src =" https://resources.jetbrains.com/storage/products/company/brand/logos/IntelliJ_IDEA.svg " alt =" IntelliJ IDEA logo. " >
78+
79+ This project is developed using JetBrains IDEA.
80+ Thanks to JetBrains for providing me with a free license, which is a strong support for me.
81+
82+ [ Badge-CI ] : https://github.com/bitlap/smt/actions/workflows/ci.yml/badge.svg
83+ [ Badge-Scaladex ] : https://index.scala-lang.org/bitlap/smt/smt-annotations/latest-by-scala-version.svg?platform=jvm
84+ [ Badge-Jetbrains ] : https://img.shields.io/jetbrains/plugin/v/17202-scala-macro-tools
85+ [ Badge-Codecov ] : https://codecov.io/gh/bitlap/smt/branch/master/graph/badge.svg?token=IA596YRTOT
86+
87+ [ Link-Jetbrains ] : https://plugins.jetbrains.com/plugin/17202-scala-macro-tools
88+ [ Link-Codecov ] : https://codecov.io/gh/bitlap/smt
89+ [ Link-Scaladex ] : https://index.scala-lang.org/bitlap/smt/smt-annotations
90+
0 commit comments