You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.6 KiB
81 lines
2.6 KiB
4 years ago
|
pluginManagement {
|
||
2 years ago
|
val COMPOSE_CORE_VERSION = extra["compose.version"] as String
|
||
3 years ago
|
println("[build] compose core version: $COMPOSE_CORE_VERSION")
|
||
|
|
||
|
// pluginManagement section won't see outer scope, hence the FQ names
|
||
|
fun properties(path: String): java.util.Properties? {
|
||
|
val localPropertiesFile = File(path)
|
||
|
if (!localPropertiesFile.exists()) {
|
||
|
return null
|
||
|
}
|
||
|
return java.io.FileInputStream(localPropertiesFile).use() { inputStream ->
|
||
|
val props = java.util.Properties()
|
||
|
props.load(inputStream)
|
||
|
props
|
||
|
}
|
||
|
}
|
||
|
|
||
|
val localProperties: java.util.Properties? = properties("local.properties")
|
||
3 years ago
|
|
||
3 years ago
|
|
||
|
val repos = (localProperties?.getProperty("compose.web.repos"))?.split(File.pathSeparator)
|
||
|
|
||
4 years ago
|
repositories {
|
||
|
gradlePluginPortal()
|
||
|
mavenCentral()
|
||
3 years ago
|
repos?.forEach { urlPath ->
|
||
|
maven {
|
||
|
url = uri(urlPath)
|
||
|
}
|
||
|
}
|
||
3 years ago
|
mavenLocal()
|
||
3 years ago
|
maven {
|
||
|
url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
||
4 years ago
|
}
|
||
|
maven {
|
||
4 years ago
|
url = uri("https://packages.jetbrains.team/maven/p/ui/dev")
|
||
4 years ago
|
}
|
||
3 years ago
|
|
||
3 years ago
|
google()
|
||
4 years ago
|
}
|
||
4 years ago
|
|
||
|
resolutionStrategy {
|
||
|
eachPlugin {
|
||
|
if (requested.id.id == "org.jetbrains.compose") {
|
||
3 years ago
|
useModule("org.jetbrains.compose:org.jetbrains.compose.gradle.plugin:$COMPOSE_CORE_VERSION")
|
||
4 years ago
|
}
|
||
|
}
|
||
|
}
|
||
4 years ago
|
}
|
||
|
|
||
4 years ago
|
fun module(name: String, path: String) {
|
||
|
include(name)
|
||
3 years ago
|
val projectDir = rootDir.resolve(path).normalize().absoluteFile
|
||
|
if (!projectDir.exists()) {
|
||
|
throw AssertionError("file $projectDir does not exist")
|
||
3 years ago
|
}
|
||
3 years ago
|
project(name).projectDir = projectDir
|
||
4 years ago
|
}
|
||
4 years ago
|
|
||
3 years ago
|
|
||
2 years ago
|
module(":html-core", "core")
|
||
|
module(":html-svg", "svg")
|
||
|
module(":html-integration-core", "integration-core")
|
||
3 years ago
|
module(":compose-compiler-integration", "compose-compiler-integration")
|
||
2 years ago
|
module(":compose-compiler-integration-lib", "compose-compiler-integration/lib")
|
||
2 years ago
|
module(":internal-html-core-runtime", "internal-html-core-runtime")
|
||
|
module(":html-test-utils", "test-utils")
|
||
4 years ago
|
|
||
3 years ago
|
if (extra["compose.web.tests.skip.benchmarks"]!!.toString().toBoolean() != true) {
|
||
2 years ago
|
module(":html-benchmark-core", "benchmark-core")
|
||
3 years ago
|
} else {
|
||
|
println("skipping benchmarks")
|
||
|
}
|
||
|
|
||
3 years ago
|
if (extra["compose.web.buildSamples"]!!.toString().toBoolean() == true) {
|
||
4 years ago
|
println("building with examples")
|
||
3 years ago
|
module(":examples:compose-web-lp", "../examples/web-landing")
|
||
4 years ago
|
module(":examples:web-compose-bird", "../examples/web-compose-bird")
|
||
4 years ago
|
module(":examples:web-with-react", "../examples/web-with-react")
|
||
4 years ago
|
}
|