Add first EnterpriseService.

This commit is contained in:
Benoit Marty
2024-06-12 18:53:28 +02:00
committed by Benoit Marty
parent bc6724923c
commit d43a8c8bea
11 changed files with 158 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.io.File
/**
* Are we building with the enterprise sources?
*/
val isEnterpriseBuild = File("enterprise/README.md").exists()

View File

@@ -64,7 +64,7 @@ object Versions {
const val compileSdk = 34
const val targetSdk = 33
// When updating the `minSdk`, make sure to update the value of `minSdkVersion` in the file `tools/release/release.sh`
const val minSdk = 24
val minSdk = if (isEnterpriseBuild) 26 else 24
val javaCompileVersion = JavaVersion.VERSION_17
val javaLanguageVersion: JavaLanguageVersion = JavaLanguageVersion.of(11)
}

View File

@@ -130,6 +130,11 @@ fun DependencyHandlerScope.allServicesImpl() {
implementation(project(":services:toolbox:impl"))
}
fun DependencyHandlerScope.allEnterpriseImpl(rootDir: File, logger: Logger) {
val enterpriseDir = File(rootDir, "enterprise")
addImplementationProjects(enterpriseDir, ":enterprise", "impl", logger)
}
fun DependencyHandlerScope.allFeaturesApi(rootDir: File, logger: Logger) {
val featuresDir = File(rootDir, "features")
addImplementationProjects(featuresDir, ":features", "api", logger)