-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AndroidComponents API support #3
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
14ff3b0
ObfuscationSeedCalculator allows generic types with file selector.
dkostyrev 105a8d1
Get rid of duplication in processor-tests subprojects.
dkostyrev 15058e0
Introduce WatermarkClassVisitor that appends special attribute to cla…
dkostyrev add27e4
Introduce WatermarkChecker and Validator that checks that inputs that…
dkostyrev 65ce36a
ParanoidProcessor validates classpath.
dkostyrev 7780c5d
Introduce more gradle extensions.
dkostyrev 36a05da
Deprecate some ParanoidExtension properties.
dkostyrev 91e5ac1
Fix isEnabled default value.
dkostyrev 61fe2b4
Allocate more memory to gradle.
dkostyrev 7536118
Introduce separate validationClasspath in ParanoidProcessor.
dkostyrev 94101a0
Introduce ParanoidTransformTask.
dkostyrev e766b0d
ParanoidPlugin uses Variant API to transform android projects and hoo…
dkostyrev 91a8def
Apply paranoid plugin to processor-tests subproject
dkostyrev 0de8ac9
Refactor MainActivityTest, introduce cases for each sub module and th…
dkostyrev 6468fbc
Add mavenLocal to repositories since we need to run tests with locall…
dkostyrev 1159eef
ParanoidExtension.isEnabled changes applyToBuildTypes.
dkostyrev a65dff3
Update Readme.
dkostyrev File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
android.useAndroidX=true | ||
development=true | ||
pablo.shadow.enabled=false | ||
org.gradle.jvmargs=-Xmx4g -XX:+UseParallelGC -Dfile.encoding=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,22 +16,34 @@ | |
|
||
package com.joom.paranoid.plugin | ||
|
||
import java.io.File | ||
|
||
import com.joom.paranoid.processor.logging.getLogger | ||
import java.io.File | ||
import kotlin.properties.Delegates | ||
import kotlin.properties.ReadWriteProperty | ||
|
||
open class ParanoidExtension { | ||
@Deprecated(IS_ENABLED_DEPRECATION_WARNING) | ||
var isEnabled: Boolean = true | ||
set(value) { | ||
getLogger().warn("WARNING: $IS_ENABLED_DEPRECATION_WARNING") | ||
field = value | ||
} | ||
var isCacheable: Boolean = false | ||
var includeSubprojects: Boolean = false | ||
|
||
@Deprecated(IS_ENABLED_DEPRECATION_WARNING, replaceWith = ReplaceWith("applyToBuildTypes")) | ||
var isEnabled: Boolean by deprecatedProperty(true, IS_ENABLED_DEPRECATION_WARNING) { enabled -> | ||
if (enabled) applyToBuildTypes = BuildType.ALL else BuildType.NONE | ||
} | ||
|
||
@Deprecated(IS_CACHEABLE_DEPRECATION_WARNING) | ||
var isCacheable: Boolean by deprecatedProperty(false, IS_CACHEABLE_DEPRECATION_WARNING) | ||
|
||
@Deprecated(INCLUDE_SUBPROJECT_DEPRECATION_WARNING) | ||
var includeSubprojects by deprecatedProperty(false, INCLUDE_SUBPROJECT_DEPRECATION_WARNING) | ||
|
||
var obfuscationSeed: Int? = null | ||
var bootClasspath: List<File> = emptyList() | ||
var applyToBuildTypes: BuildType = BuildType.ALL | ||
|
||
private inline fun <reified T : Any> deprecatedProperty(initial: T, message: String, crossinline onChange: (T) -> Unit = {}): ReadWriteProperty<Any?, T> { | ||
return Delegates.observable(initial) { _, _, new -> | ||
getLogger().warn("WARNING: $message") | ||
onChange(new) | ||
} | ||
} | ||
} | ||
|
||
enum class BuildType { | ||
|
@@ -40,4 +52,6 @@ enum class BuildType { | |
NOT_DEBUGGABLE | ||
} | ||
|
||
private const val IS_ENABLED_DEPRECATION_WARNING = "paranoid.enabled is deprecated. Use paranoid.applyToBuildTypes" | ||
private const val IS_ENABLED_DEPRECATION_WARNING = "paranoid.enabled is deprecated. Use paranoid.applyToBuildTypes" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. тут можно через There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
private const val IS_CACHEABLE_DEPRECATION_WARNING = "paranoid.isCacheable is deprecated" | ||
private const val INCLUDE_SUBPROJECT_DEPRECATION_WARNING = "paranoid.includeSubprojects is deprecated" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В комментарии к коммиту говориться "Add mavenCentral to repositories..." скорее всего опечатка, и имелось в виду все-таки
mavenLocal
, но решил обратить внимание на всякий пожарныйThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed