All Downloads are FREE. Search and download functionalities are using the official Maven repository.

foundry.gradle.anvil.AnvilMode.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.anvil

public enum class AnvilMode(
  public val useKspFactoryGen: Boolean,
  public val useKspContributionMerging: Boolean,
  public val languageVersionOverride: String?,
  public val useDaggerKsp: Boolean,
) {
  /**
   * Anvil support for K1.
   * - `AnalysisHandlerExtension`
   * - KAPT3 contribution merging
   * - dagger apt
   */
  K1_EMBEDDED(false, false, null, false),
  /**
   * Anvil support for K1.
   * - KSP factory gen
   * - KAPT contribution merging
   * - dagger apt
   */
  K1_KAPT(true, false, null, false),
  /**
   * Anvil support for K1.
   * - KSP factory gen
   * - KSP contribution merging
   * - dagger apt
   */
  K1_KSP_KAPT(true, true, null, false),
  /**
   * Anvil support for K1.
   * - KSP factory gen
   * - KSP contribution merging
   * - dagger-ksp
   */
  K1_KSP_ONLY(true, true, null, true),
  /**
   * Anvil support for K2. Same as [K1_EMBEDDED] but it forces Anvil-integrated kotlin compilations
   * to language version 1.9.
   */
  K2_COMPAT(false, false, "1.9", false),
  /**
   * Anvil support for K2.
   * - KSP factory gen
   * - KAPT contribution merging
   * - dagger apt
   */
  K2_KAPT(true, false, null, false),
  /**
   * Anvil support for K2.
   * - KSP factory gen
   * - KSP contribution merging
   * - dagger apt
   */
  K2_KSP_KAPT(true, true, null, false),
  /**
   * Anvil support for K2.
   * - KSP factory gen
   * - KSP contribution merging
   * - dagger-ksp
   */
  K2_KSP_ONLY(true, true, null, true),
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy