com.github.megatronking.stringfog.plugin.StringFogTransformForApplication.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-plugin Show documentation
Show all versions of gradle-plugin Show documentation
A String encryption Library for Android
package com.github.megatronking.stringfog.plugin
import com.android.build.api.transform.QualifiedContent
import com.android.build.gradle.api.BaseVariant
import com.google.common.collect.ImmutableSet
import org.gradle.api.DomainObjectSet
import org.gradle.api.Project
/**
* StringFog transform used in application.
*
* @author Megatron King
* @since 17/7/28 12:28
*/
class StringFogTransformForApplication extends StringFogTransform {
StringFogTransformForApplication(Project project, DomainObjectSet variants) {
super(project, variants);
}
@Override
Set getScopes() {
def name = QualifiedContent.Scope.PROJECT_LOCAL_DEPS.name()
def deprecated = QualifiedContent.Scope.PROJECT_LOCAL_DEPS.getClass()
.getField(name).getAnnotation(Deprecated.class)
if (deprecated == null) {
return ImmutableSet. of(QualifiedContent.Scope.PROJECT
, QualifiedContent.Scope.PROJECT_LOCAL_DEPS
, QualifiedContent.Scope.EXTERNAL_LIBRARIES
, QualifiedContent.Scope.SUB_PROJECTS
, QualifiedContent.Scope.SUB_PROJECTS_LOCAL_DEPS)
} else {
return ImmutableSet. of(QualifiedContent.Scope.PROJECT
, QualifiedContent.Scope.EXTERNAL_LIBRARIES
, QualifiedContent.Scope.SUB_PROJECTS)
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy