public DefaultBuildType initWith(DefaultBuildType that) { _initWith(that); setDebuggable(that.isDebuggable()); setTestCoverageEnabled(that.isTestCoverageEnabled()); setJniDebuggable(that.isJniDebuggable()); setRenderscriptDebuggable(that.isRenderscriptDebuggable()); setRenderscriptOptimLevel(that.getRenderscriptOptimLevel()); setApplicationIdSuffix(that.getApplicationIdSuffix()); setVersionNameSuffix(that.getVersionNameSuffix()); setMinifyEnabled(that.isMinifyEnabled() ); setZipAlignEnabled(that.isZipAlignEnabled()); setSigningConfig(that.getSigningConfig()); setEmbedMicroApp(that.isEmbedMicroApp()); setPseudoLocalesEnabled(that.isPseudoLocalesEnabled()); return this; }
@Override @NonNull public String toString() { return MoreObjects.toStringHelper(this) .add("name", mName) .add("debuggable", mDebuggable) .add("testCoverageEnabled", mTestCoverageEnabled) .add("jniDebuggable", mJniDebuggable) .add("pseudoLocalesEnabled", mPseudoLocalesEnabled) .add("renderscriptDebuggable", mRenderscriptDebuggable) .add("renderscriptOptimLevel", mRenderscriptOptimLevel) .add("minifyEnabled", mMinifyEnabled) .add("zipAlignEnabled", mZipAlignEnabled) .add("signingConfig", mSigningConfig) .add("embedMicroApp", mEmbedMicroApp) .add("mBuildConfigFields", getBuildConfigFields()) .add("mResValues", getResValues()) .add("mProguardFiles", getProguardFiles()) .add("mConsumerProguardFiles", getConsumerProguardFiles()) .add("mManifestPlaceholders", getManifestPlaceholders()) .toString(); } }
/** * Copies all properties from the given build type. * * <p>It can be used like this: * <pre> * android.buildTypes { * customBuildType { * initWith debug * // customize... * } * } * </pre> */ public DefaultBuildType initWith(BuildType that) { _initWith(that); setDebuggable(that.isDebuggable()); setTestCoverageEnabled(that.isTestCoverageEnabled()); setJniDebuggable(that.isJniDebuggable()); setRenderscriptDebuggable(that.isRenderscriptDebuggable()); setRenderscriptOptimLevel(that.getRenderscriptOptimLevel()); setVersionNameSuffix(that.getVersionNameSuffix()); setMinifyEnabled(that.isMinifyEnabled() ); setZipAlignEnabled(that.isZipAlignEnabled()); setSigningConfig(that.getSigningConfig()); setEmbedMicroApp(that.isEmbedMicroApp()); setPseudoLocalesEnabled(that.isPseudoLocalesEnabled()); return this; }
/** The signing configuration. */ @Override @Nullable public SigningConfig getSigningConfig() { return (SigningConfig) super.getSigningConfig(); }
@Override protected void _initWith(@NonNull BaseConfig that) { super._initWith(that); BuildType thatBuildType = (BuildType) that; ndkConfig._initWith(thatBuildType.getNdkConfig()); jackOptions._initWith(thatBuildType.getJackOptions()); javaCompileOptions.getAnnotationProcessorOptions()._initWith( thatBuildType.getJavaCompileOptions().getAnnotationProcessorOptions()); shrinkResources = thatBuildType.isShrinkResources(); shaderOptions._initWith(thatBuildType.getShaders()); externalNativeBuildOptions._initWith(thatBuildType.getExternalNativeBuildOptions()); useProguard = thatBuildType.isUseProguard(); }
@Override @NonNull public String toString() { return Objects.toStringHelper(this) .add("name", mName) .add("debuggable", mDebuggable) .add("testCoverageEnabled", mTestCoverageEnabled) .add("jniDebuggable", mJniDebuggable) .add("pseudoLocalesEnabled", mPseudoLocalesEnabled) .add("renderscriptDebuggable", mRenderscriptDebuggable) .add("renderscriptOptimLevel", mRenderscriptOptimLevel) .add("applicationIdSuffix", mApplicationIdSuffix) .add("versionNameSuffix", mVersionNameSuffix) .add("minifyEnabled", mMinifyEnabled) .add("zipAlignEnabled", mZipAlignEnabled) .add("signingConfig", mSigningConfig) .add("embedMicroApp", mEmbedMicroApp) .add("mBuildConfigFields", getBuildConfigFields()) .add("mResValues", getResValues()) .add("mProguardFiles", getProguardFiles()) .add("mConsumerProguardFiles", getConsumerProguardFiles()) .add("mManifestPlaceholders", getManifestPlaceholders()) .toString(); } }