-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathsettings.gradle.kts
174 lines (150 loc) · 6.68 KB
/
settings.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
/*
* Copyright (C) 2024 OpenAni and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license, which can be found at the following link.
*
* https://github.com/open-ani/ani/blob/main/LICENSE
*/
import java.util.Properties
/*
* Copyright (C) 2024 OpenAni and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license, which can be found at the following link.
*
* https://github.com/open-ani/ani/blob/main/LICENSE
*/
rootProject.name = "animeko"
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
google()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") // Compose Multiplatform pre-release versions
}
}
dependencyResolutionManagement {
@Suppress("UnstableApiUsage")
repositories {
mavenCentral()
}
versionCatalogs {
create("anitorrentLibs") {
from("org.openani.anitorrent:catalog:0.1.1")
}
create("mediampLibs") {
from("org.openani.mediamp:catalog:0.0.19")
}
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}
fun includeProject(projectPath: String, dir: String? = null) {
include(projectPath)
if (dir != null) project(projectPath).projectDir = file(dir)
}
// Utilities shared by client and server (targeting JVM)
includeProject(":utils:platform") // 适配各个平台的基础 API
includeProject(":utils:intellij-annotations")
includeProject(":utils:logging") // shared by client and server (targets JVM)
includeProject(":utils:serialization", "utils/serialization")
includeProject(":utils:coroutines", "utils/coroutines")
includeProject(":utils:ktor-client", "utils/ktor-client")
includeProject(":utils:io", "utils/io")
includeProject(":utils:testing", "utils/testing")
includeProject(":utils:xml")
includeProject(":utils:jsonpath")
includeProject(":utils:bbcode", "utils/bbcode")
includeProject(":utils:bbcode:test-codegen")
includeProject(":utils:ip-parser", "utils/ip-parser")
includeProject(":utils:ui-testing")
includeProject(":torrent:torrent-api", "torrent/api") // Torrent 系统 API
includeProject(":torrent:anitorrent")
//includeProject(":torrent:anitorrent:anitorrent-native")
includeProject(":app:shared")
includeProject(":app:shared:app-platform")
includeProject(":app:shared:app-data")
includeProject(":app:shared:ui-foundation")
includeProject(":app:shared:ui-settings")
includeProject(":app:shared:ui-adaptive")
includeProject(":app:shared:ui-subject")
includeProject(":app:shared:ui-exploration")
includeProject(":app:shared:ui-comment")
includeProject(":app:shared:video-player:video-player-api", "app/shared/video-player/api")
includeProject(":app:shared:video-player:torrent-source")
includeProject(":app:shared:video-player")
includeProject(":app:shared:application")
includeProject(":app:shared:placeholder", "app/shared/thirdparty/placeholder")
includeProject(":app:shared:paging-compose", "app/shared/thirdparty/paging-compose")
includeProject(":app:shared:image-viewer", "app/shared/thirdparty/image-viewer")
includeProject(":app:shared:reorderable", "app/shared/thirdparty/reorderable")
includeProject(":app:desktop", "app/desktop") // desktop JVM client for macOS, Windows, and Linux
includeProject(":app:android", "app/android") // Android client
includeProject(":client")
// server
//includeProject(":server:core", "server/core") // server core
//includeProject(":server:database", "server/database") // server database interfaces
//includeProject(":server:database-xodus", "server/database-xodus") // database implementation with Xodus
// data sources
includeProject(":datasource:datasource-api", "datasource/api") // data source interfaces: Media, MediaSource
includeProject(":datasource:datasource-api:test-codegen", "datasource/api/test-codegen") // 生成单元测试
includeProject(
":datasource:datasource-core",
"datasource/core",
) // data source managers: MediaFetcher, MediaCacheStorage
includeProject(":datasource:bangumi", "datasource/bangumi") // https://bangumi.tv
// BT 数据源
includeProject(":datasource:dmhy", "datasource/bt/dmhy") // https://dmhy.org
includeProject(":datasource:mikan", "datasource/bt/mikan") // https://mikanani.me/
// Web 数据源
includeProject(":datasource:web-base", "datasource/web/web-base") // web 基础
includeProject(":datasource:jellyfin", "datasource/jellyfin")
includeProject(":datasource:ikaros", "datasource/ikaros") // https://ikaros.run/
// danmaku
includeProject(":danmaku:danmaku-ui-config", "danmaku/ui-config")
includeProject(":danmaku:danmaku-api", "danmaku/api")
includeProject(":danmaku:danmaku-ui", "danmaku/ui")
includeProject(":danmaku:dandanplay", "danmaku/dandanplay")
includeProject(
":datasource:dmhy:dataset-tools",
"datasource/bt/dmhy/dataset-tools",
) // tools for generating dataset for ML title parsing
// ci
includeProject(":ci-helper", "ci-helper") //
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
val localPropertiesFile: File get() = rootProject.projectDir.resolve("local.properties")
fun findLocalProperty(key: String): String? {
return if (localPropertiesFile.exists()) {
val properties = Properties()
localPropertiesFile.inputStream().buffered().use { input ->
properties.load(input)
}
properties.getProperty(key)
} else {
localPropertiesFile.createNewFile()
null
}
}
findLocalProperty("ani.build.mediamp.path")?.let { mediampPath ->
println("i:: Including mediamp as a Composite Build from: $mediampPath")
includeBuild(mediampPath) {
dependencySubstitution {
substitute(module("org.openani.mediamp:mediamp-api"))
.using(project(":mediamp-api"))
substitute(module("org.openani.mediamp:mediamp-compose"))
.using(project(":mediamp-compose"))
substitute(module("org.openani.mediamp:mediamp-exoplayer"))
.using(project(":mediamp-exoplayer"))
substitute(module("org.openani.mediamp:mediamp-exoplayer-compose"))
.using(project(":mediamp-exoplayer-compose"))
substitute(module("org.openani.mediamp:mediamp-vlc"))
.using(project(":mediamp-vlc"))
substitute(module("org.openani.mediamp:mediamp-vlc-compose"))
.using(project(":mediamp-vlc-compose"))
substitute(module("org.openani.mediamp:mediamp-source-ktxio"))
.using(project(":mediamp-source-ktxio"))
}
}
}