Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit cd20f9e

Browse files
remove unavailable modules (#237)
* remove unavailable modules
1 parent a439c4d commit cd20f9e

File tree

62 files changed

+48
-2435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+48
-2435
lines changed

README.md

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
添加库依赖,下面是如何在 SBT 中使用
2323

24-
> 在gradle,maven中,通常`smt-annotations`被替换为`smt-annotations_2.12`这种。其中,`2.12`表示Scala版本号。
24+
> 在gradle,maven中,通常`smt-annotations`被替换为`smt-annotations_2.12`其中,`2.12`表示Scala版本号。
2525
2626
## cache
2727

@@ -51,15 +51,15 @@
5151
- 零依赖,类型安全。
5252

5353
```scala
54-
"org.bitlap" %% "smt-csv" % "<VERSION>" // 从0.5.2开始
54+
"org.bitlap" %% "smt-csv" % "<VERSION>"
5555
```
5656

5757
## csv-derive
5858

5959
- `DeriveCsvConverter` 为Scala`case class`自动派生`Converter`实例。
6060

6161
```scala
62-
"org.bitlap" %% "smt-csv-derive" % "<VERSION>" // 从0.5.2开始
62+
"org.bitlap" %% "smt-csv-derive" % "<VERSION>"
6363
```
6464

6565
## annotations
@@ -76,37 +76,7 @@
7676
> Intellij插件 `Scala-Macro-Tools`
7777
7878
```scala
79-
"org.bitlap" %% "smt-annotations" % "<VERSION>" // 从0.6.0开始名字改成 smt-annotations
80-
```
81-
82-
## cacheable [不可上生产]
83-
84-
基于zio的类似Spring`@Cacheable``@CacheEvict`注解的缓存API定义。该模块不包含具体的存储媒介。
85-
86-
- `@cacheable` / `Cache.apply`
87-
- `@cacheEvict` / `Cache.evict`
88-
89-
```scala
90-
// 内部包含的依赖: zio, zio-streams, zio-logging
91-
"org.bitlap" %% "smt-cacheable" % "<VERSION>" // 不支持Scala2.11.x
92-
```
93-
94-
## cacheable-redis [不可上生产]
95-
96-
基于zio和zio-redis的分布式缓存实现,内部依赖`cacheable`
97-
98-
> TODO,目前不可用
99-
100-
```scala
101-
"org.bitlap" %% "smt-cacheable-redis" % "<VERSION>" // 不支持Scala2.11.x
102-
```
103-
104-
## cacheable-caffeine [不可上生产]
105-
106-
基于zio和caffeine的内存缓存实现,内部依赖`cacheable`。(不支持Scala2.11.x)
107-
108-
```scala
109-
"org.bitlap" %% "smt-cacheable-caffeine" % "<VERSION>"
79+
"org.bitlap" %% "smt-annotations" % "<VERSION>"
11080
```
11181

11282
该库已发布到maven中央仓库,请使用最新版本。仅将本库导入构建系统(例如gradle、sbt)是不够的。你需要多走一步。
@@ -142,4 +112,4 @@ Thanks to JetBrains for providing me with a free license, which is a strong supp
142112
[Link-Jetbrains]: https://plugins.jetbrains.com/plugin/17202-scala-macro-tools
143113
[Link-Codecov]: https://codecov.io/gh/bitlap/smt
144114
[Link-Scaladex]: https://index.scala-lang.org/bitlap/smt/smt-annotations
145-
[Link-Snapshots]: https://s01.oss.sonatype.org/content/repositories/snapshots/org/bitlap/
115+
[Link-Snapshots]: https://s01.oss.sonatype.org/content/repositories/snapshots/org/bitlap/

build.sbt

Lines changed: 4 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,11 @@ ThisBuild / resolvers ++= Seq(
88
"New snapshots" at "https://s01.oss.sonatype.org/content/repositories/snapshots/"
99
)
1010

11-
lazy val scala212 = "2.12.14"
12-
lazy val scala211 = "2.11.12"
13-
lazy val scala213 = "2.13.8"
14-
lazy val lastVersionForExamples = "0.7.3"
11+
lazy val scala212 = "2.12.14"
12+
lazy val scala211 = "2.11.12"
13+
lazy val scala213 = "2.13.8"
1514

16-
lazy val configVersion = "1.4.2"
1715
lazy val scalatestVersion = "3.2.13"
18-
lazy val zioVersion = "1.0.16"
19-
lazy val zioLoggingVersion = "0.5.14"
20-
lazy val caffeineVersion = "2.9.3"
21-
lazy val zioRedisVersion = "0.0.0+381-86c20614-SNAPSHOT" // 实验性质的
22-
lazy val zioSchemaVersion = "0.1.9"
2316
lazy val scalaLoggingVersion = "3.9.5"
2417
lazy val log4jVersion = "2.18.0"
2518
lazy val scalaCollectionCompatVersion = "2.8.1"
@@ -49,54 +42,6 @@ lazy val commonSettings =
4942
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true)
5043
)
5144

52-
lazy val `smt-cacheable` = (project in file("smt-cacheable"))
53-
.settings(commonSettings)
54-
.settings(Publishing.publishSettings)
55-
.settings(
56-
name := "smt-cacheable",
57-
crossScalaVersions := List(scala213, scala212),
58-
libraryDependencies ++= Seq(
59-
"dev.zio" %% "zio" % zioVersion % Provided,
60-
"dev.zio" %% "zio-streams" % zioVersion,
61-
"dev.zio" %% "zio-logging" % zioLoggingVersion
62-
)
63-
)
64-
.settings(paradise())
65-
.enablePlugins(HeaderPlugin)
66-
67-
lazy val `smt-cacheable-caffeine` = (project in file("smt-cacheable-caffeine"))
68-
.settings(commonSettings)
69-
.settings(Publishing.publishSettings)
70-
.settings(
71-
name := "smt-cacheable-caffeine",
72-
crossScalaVersions := List(scala213, scala212),
73-
libraryDependencies ++= Seq(
74-
"com.typesafe" % "config" % configVersion,
75-
"com.github.ben-manes.caffeine" % "caffeine" % caffeineVersion
76-
)
77-
)
78-
.dependsOn(`smt-cacheable` % "compile->compile;test->test")
79-
.settings(paradise())
80-
.enablePlugins(HeaderPlugin)
81-
82-
lazy val `smt-cacheable-redis` = (project in file("smt-cacheable-redis"))
83-
.settings(commonSettings)
84-
.settings(Publishing.publishSettings)
85-
.settings(
86-
name := "smt-cacheable-redis",
87-
crossScalaVersions := List(scala213, scala212),
88-
libraryDependencies ++= Seq(
89-
"dev.zio" %% "zio-redis" % zioRedisVersion % Provided,
90-
"com.typesafe" % "config" % configVersion,
91-
"dev.zio" %% "zio-schema" % zioSchemaVersion,
92-
"dev.zio" %% "zio-schema-json" % zioSchemaVersion,
93-
"dev.zio" %% "zio-schema-derivation" % zioSchemaVersion % Test
94-
)
95-
)
96-
.dependsOn(`smt-cacheable` % "compile->compile;test->test")
97-
.settings(paradise())
98-
.enablePlugins(HeaderPlugin)
99-
10045
lazy val `smt-csv` = (project in file("smt-csv"))
10146
.settings(commonSettings)
10247
.settings(
@@ -160,16 +105,10 @@ lazy val `smt-annotations` = (project in file("smt-annotations"))
160105
lazy val `smt` = (project in file("."))
161106
.aggregate(
162107
`smt-annotations`,
163-
`smt-cacheable`,
164-
`smt-cacheable-redis`,
165-
`smt-cacheable-caffeine`,
166108
`smt-csv`,
167109
`smt-csv-derive`,
168110
`smt-cache`,
169-
`smt-common`,
170-
`scala2-11`,
171-
`scala2-12`,
172-
`scala2-13`
111+
`smt-common`
173112
)
174113
.settings(
175114
commands ++= Commands.value,
@@ -196,54 +135,6 @@ lazy val `smt` = (project in file("."))
196135
)
197136
)
198137

199-
lazy val `scala2-13` = (project in file("examples/scala2-13"))
200-
.settings(scalaVersion := scala213)
201-
.settings(
202-
libraryDependencies ++= Seq(
203-
"org.bitlap" %% "smt-annotations" % lastVersionForExamples,
204-
"org.bitlap" %% "smt-cacheable" % lastVersionForExamples,
205-
"org.bitlap" %% "smt-cacheable-redis" % lastVersionForExamples,
206-
"org.bitlap" %% "smt-cacheable-caffeine" % lastVersionForExamples,
207-
"dev.zio" %% "zio-redis" % zioRedisVersion,
208-
"dev.zio" %% "zio" % zioVersion
209-
)
210-
)
211-
.settings(
212-
publish / skip := true,
213-
Compile / scalacOptions ++= List("-Ymacro-annotations", "-Ywarn-unused")
214-
)
215-
216-
lazy val `scala2-12` = (project in file("examples/scala2-12"))
217-
.settings(scalaVersion := scala212)
218-
.settings(
219-
libraryDependencies ++= Seq(
220-
"org.bitlap" %% "smt-annotations" % lastVersionForExamples,
221-
"org.bitlap" %% "smt-cacheable" % lastVersionForExamples,
222-
"org.bitlap" %% "smt-cacheable-redis" % lastVersionForExamples,
223-
"org.bitlap" %% "smt-cacheable-caffeine" % lastVersionForExamples,
224-
"dev.zio" %% "zio-redis" % zioRedisVersion,
225-
"dev.zio" %% "zio" % zioVersion
226-
)
227-
)
228-
.settings(
229-
publish / skip := true,
230-
scalacOptions ++= List("-Xlint:unused"),
231-
paradise()
232-
)
233-
234-
lazy val `scala2-11` = (project in file("examples/scala2-11"))
235-
.settings(scalaVersion := scala211)
236-
.settings(
237-
libraryDependencies ++= Seq(
238-
"org.bitlap" %% "smt-annotations" % lastVersionForExamples
239-
)
240-
)
241-
.settings(
242-
publish / skip := true,
243-
scalacOptions ++= List("-Xlint:unused"),
244-
paradise()
245-
)
246-
247138
def paradise(): Def.Setting[Seq[ModuleID]] =
248139
libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
249140
case Some((2, n)) if n < 13 => Some("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full)

examples/scala2-11/src/main/scala/org/bitlap/tools/Main.scala

Lines changed: 0 additions & 20 deletions
This file was deleted.

examples/scala2-12/src/main/scala/org/bitlap/tools/CacheExample.scala

Lines changed: 0 additions & 71 deletions
This file was deleted.

examples/scala2-12/src/main/scala/org/bitlap/tools/CacheValue.scala

Lines changed: 0 additions & 13 deletions
This file was deleted.

examples/scala2-12/src/main/scala/org/bitlap/tools/Main.scala

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)