Skip to content

Commit

Permalink
Merge pull request #55 from infinum/develop
Browse files Browse the repository at this point in the history
Release 1.3.1
  • Loading branch information
bojankoma authored Sep 27, 2021
2 parents 8b237ad + 9aa7266 commit a184680
Show file tree
Hide file tree
Showing 57 changed files with 1,100 additions and 435 deletions.
21 changes: 21 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
Change Log
==========

## Version 1.3.1

_2021-09-27_

* Deprecate screen name length limit.
* Update Kotlin to 1.5.31.
* Update Kotlin Poet and fix breaking changes.
* Update various dependencies.
* Prepare and optimize for Android 12.
* Use KSP for Room in UI module.
* Refactor AlertDialog to BottomSheetDialogFragment.
* Optimize Snackbar ViewBinding.

## Version 1.3.0

_2021-08-23_
Expand Down
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Feedback and code contributions are very much welcome. Just make a pull request with a short description of your changes. By making contributions to this project you give permission for your code to be used under the same [license](LICENSE).

For easier developing a `sample` application with proper implementations is provided.

Pushing changes directly into master branch is not allowed, please create a separate branch with your changes and then create a pull request.
38 changes: 16 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "com.infinum.collar:collar-plugin:1.3.0"
classpath "com.infinum.collar:collar-plugin:1.3.1"
}
}
```
Expand All @@ -42,7 +42,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.infinum.collar:collar-plugin:1.3.0")
classpath("com.infinum.collar:collar-plugin:1.3.1")
}
}
```
Expand Down Expand Up @@ -107,7 +107,7 @@ If a screen name annotation value is not provided then class name will be used a
A convenience extension method will be generated by annotation processor _trackScreen_ which must be called explicitly and preferably in _onResume_ lifecycle callback.
However, you can always use _Collar_ methods explicitly besides the extension one to track your screen names.
```kotlin
Collar.trackScreen(screen)
Collar.trackScreen(screen)
```

#### Events
Expand Down Expand Up @@ -144,7 +144,7 @@ You can have multiple annotated sealed classes declared like this through your p
A convenience extension method will be generated by annotation processor _trackEvent_ which must be called explicitly with the instance of your previously defined event class.
However, you can always use _Collar_ methods explicitly besides the extension one to track your analytics events in the same way.
```kotlin
Collar.trackEvent(event)
Collar.trackEvent(event)
```

```kotlin
Expand Down Expand Up @@ -195,7 +195,7 @@ You can have multiple annotated sealed classes declared like this through your p
A convenience extension method will be generated by annotation processor _trackProperty_ which must be called explicitly with the instance of your previously defined property class.
However, you can always use _Collar_ methods explicitly besides the extension one to track your user properties in the same way.
```kotlin
Collar.trackProperty(property)
Collar.trackProperty(property)
```

```kotlin
Expand Down Expand Up @@ -233,7 +233,6 @@ _Collar_ plugin has been tuned per default for the most often used Firebase Anal
```gradle
javaCompileOptions {
annotationProcessorOptions {
argument "screen_name_length", "33"
argument "events_count", "100"
argument "event_parameters_count", "10"
argument "event_name_length", "20"
Expand All @@ -246,7 +245,7 @@ javaCompileOptions {

## Lint checks

_Collar_ plugin provides it's own custom Lint checks. These can be disabled, suppressed or fixed like any other Lint registered issues.
_Collar_ plugin provides it's own custom _Lint_ checks. These can be disabled, suppressed or fixed like any other Lint registered issues.
Checks:
- `MissingScreenNameAnnotation` - All Activities and Fragments require a valid screen name annotation on the class. You must annotate an Activity or Fragment with @ScreenName with a valid value parameter or set enabled parameter to false.

Expand All @@ -260,13 +259,13 @@ You can search, filter and clear all sent analytics.
In your app `build.gradle` or `build.gradle.kts` add:
**Groovy**
```gradle
debugImplementation "com.infinum.collar:collar-ui:1.3.0"
releaseImplementation "com.infinum.collar:collar-ui-no-op:1.3.0"
debugImplementation "com.infinum.collar:collar-ui:1.3.1"
releaseImplementation "com.infinum.collar:collar-ui-no-op:1.3.1"
```
**KotlinDSL**
```kotlin
debugImplementation("com.infinum.collar:collar-ui:1.3.0")
releaseImplementation("com.infinum.collar:collar-ui-no-op:1.3.0")
debugImplementation("com.infinum.collar:collar-ui:1.3.1")
releaseImplementation("com.infinum.collar:collar-ui-no-op:1.3.1")
```

In order to start tracking with UI you must use _LiveCollector_ as in this example:
Expand Down Expand Up @@ -303,15 +302,15 @@ These parameters are default values per collector session but can be changed via
Otherwise if set to *false* notification will **not** be shown but you can always run the UI with following command of getting the launch Intent instead of clicking the actual notification:

```kotlin
startActivity(
CollarUi.launchIntent().apply {
addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
}
)
startActivity(
CollarUi.launchIntent().apply {
addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
}
)
```
Alternatively, you can use a dedicated method with default Intent setup:
```kotlin
CollarUi.show()
CollarUi.show()
```
The final *Configuration* parameter is a set of keywords to redact if found in screen names, analytics events names and parameters and user properties names or values.

Expand Down Expand Up @@ -347,11 +346,6 @@ To run the task you can:

`generate` Gradle task will create classes prepared for the _Collar_ annotation processor.

## Contributing

Feedback and code contributions are very much welcome. Just make a pull request with a short description of your changes. By making contributions to this project you give permission for your code to be used under the same [license](LICENSE).
For easier developing a `sample` application with proper implementations is provided.

## License

```
Expand Down
4 changes: 0 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ subprojects {
apply from: "deploy.gradle"
apply from: "jacoco.gradle"

tasks.withType(JavaCompile) {
options.compilerArgs += ["--release", "8"]
}

task clean(type: Delete) {
delete rootProject.buildDir
}
Expand Down
10 changes: 5 additions & 5 deletions config.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ext {
buildConfig = [
"minSdk" : 19,
"compileSdk": 30,
"targetSdk" : 30,
"buildTools": "30.0.3"
"compileSdk": 31,
"targetSdk" : 31,
"buildTools": "31.0.0"
]
releaseConfig = [
"group" : "com.infinum.collar",
"version" : "1.3.0",
"versionCode": 1 * 100 * 100 + 3 * 100 + 0
"version" : "1.3.1",
"versionCode": 1 * 100 * 100 + 3 * 100 + 1
]
}
4 changes: 2 additions & 2 deletions deploy.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ task deployDebug(dependsOn: [
':plugin:clean',
':annotations:publishReleasePublicationToMavenLocal',
':lint:publishReleasePublicationToMavenLocal',
':generator:publishReleasePublicationToMavenLocal',
':core:publishReleasePublicationToMavenLocal',
':processor:publishReleasePublicationToMavenLocal',
':ui:publishReleasePublicationToMavenLocal',
':ui-no-op:publishReleasePublicationToMavenLocal',
':processor:publishReleasePublicationToMavenLocal',
':generator:publishReleasePublicationToMavenLocal',
':plugin:publishReleasePublicationToMavenLocal',
]) {
group = "Deploy"
Expand Down
3 changes: 3 additions & 0 deletions generator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ java {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += [
'-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi'
]
}
}
compileTestKotlin {
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m
org.gradle.jvm.version=8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand All @@ -16,7 +15,7 @@ android.useAndroidX=true
android.enableJetifier=false

kotlin.code.style=official
# Revert back to true after Kotlin 1.5.20 bugfix
# Revert back to true after Kotlin 1.5.20 bugfix but it still doesn't work in 1.5.21
kapt.use.worker.api=false

# org.gradle.daemon=false
Expand Down
Loading

0 comments on commit a184680

Please sign in to comment.