foundry.gradle.topography.ModuleFeaturesConfig.kt Maven / Gradle / Ivy
/*
* Copyright (C) 2024 Slack Technologies, LLC
*
* 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
*
* https://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.
*/
package foundry.gradle.topography
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import foundry.common.json.JsonTools
import foundry.common.json.JsonTools.readJsonValueMap
import java.nio.file.Path
/**
* Represents a configuration for module features that can be JSON-encoded.
*
* @property _features the set of user-defined [features][ModuleFeature].
* @property _buildUponDefaults indicates whether these should build upon the [DefaultFeatures] set.
* @property _defaultFeatureOverrides adhoc overrides of default feature values. These should be a
* subset of [ModuleFeature] properties and will be overlaid onto them
*/
@Suppress("PropertyName")
@JsonClass(generateAdapter = true)
internal data class ModuleFeaturesConfig(
@Json(name = "features") val _features: Set = emptySet(),
@Json(name = "buildUponDefaults") val _buildUponDefaults: Boolean = true,
@Json(name = "defaultFeatureOverrides")
val _defaultFeatureOverrides: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy