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

com.autonomousapps.internal.android.AndroidGradlePlugin4_2.kt Maven / Gradle / Ivy

There is a newer version: 2.6.1
Show newest version
// Copyright (c) 2024. Tony Robalik.
// SPDX-License-Identifier: Apache-2.0
@file:Suppress("ClassName", "UnstableApiUsage")

package com.autonomousapps.internal.android

import com.android.build.api.dsl.CommonExtension
import org.gradle.api.Project
import org.gradle.api.provider.Provider

internal class AndroidGradlePlugin4_2(private val project: Project) : AndroidGradlePlugin {

  override fun isViewBindingEnabled(): Provider {
    return project.provider { project.extensions.getByType(CommonExtension::class.java).viewBinding.enable }
  }

  override fun isDataBindingEnabled(): Provider {
    return project.provider { project.extensions.getByType(CommonExtension::class.java).dataBinding.enable }
  }

  override fun namespace(): Provider {
    return project.providers.provider {
      project.extensions.getByType(CommonExtension::class.java).namespace ?: ""
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy