annotations-compiler

Annotation Processor for the Mixpanel library for Android http://mixpanel.com/android-analytics/

Лицензия

Лицензия

The Apache Software License, Version 2.0
Группа

Группа

com.mixpanel.android
Идентификатор

Идентификатор

annotations-compiler
Последняя версия

Последняя версия

0.1.0-RC1
Дата

Дата

Тип

Тип

jar
Описание

Описание

annotations-compiler
Annotation Processor for the Mixpanel library for Android http://mixpanel.com/android-analytics/
Ссылка на сайт

Ссылка на сайт

https://github.com/mixpanel/mixpanel-android
Система контроля версий

Система контроля версий

http://github.com/mixpanel/mixpanel-android-build

Скачать annotations-compiler

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.mixpanel.android/annotations-compiler/ -->
<dependency>
    <groupId>com.mixpanel.android</groupId>
    <artifactId>annotations-compiler</artifactId>
    <version>0.1.0-RC1</version>
</dependency>
// https://jarcasting.com/artifacts/com.mixpanel.android/annotations-compiler/
implementation 'com.mixpanel.android:annotations-compiler:0.1.0-RC1'
// https://jarcasting.com/artifacts/com.mixpanel.android/annotations-compiler/
implementation ("com.mixpanel.android:annotations-compiler:0.1.0-RC1")
'com.mixpanel.android:annotations-compiler:jar:0.1.0-RC1'
<dependency org="com.mixpanel.android" name="annotations-compiler" rev="0.1.0-RC1">
  <artifact name="annotations-compiler" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.mixpanel.android', module='annotations-compiler', version='0.1.0-RC1')
)
libraryDependencies += "com.mixpanel.android" % "annotations-compiler" % "0.1.0-RC1"
[com.mixpanel.android/annotations-compiler "0.1.0-RC1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.mixpanel.android : annotations jar 0.1.0-RC1

Модули Проекта

Данный проект не имеет модулей.

Mixpanel Build Tools for Android

This project contains tools that make it easier to to integrate Mixpanel into your application using Gradle and Android Studio.

Mixpanel Tweaks Annotations

Mixpanel Tweaks are a way for you to A/B test different settings and configuration values in your application. You can use tweaks directly in your code using the Mixpanel library, but you can also take advantage of tweaks using the @Tweak annotation on your Java methods.

To use @Tweak, annotate a public method of a public class in your code like this:

import com.mixpanel.android.build.Tweak;

public class MyGreatClass {
    public MyGreatClass() {
        mixpanel.registerForTweaks(this);
    }

    @Tweak(name="greeting")
    public void setGreeting(String greeting) {
        ...
    }
    ...
}

That's it!

Building with Tweak Annotations

Tweak annotations are currently supported in Gradle and Android Studio via a Gradle plugin.

To add Tweak annotations to your build, add the following buildscript dependency to your build.gradle file

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        // Add the line below as a dependency of your buildscript
        classpath 'com.mixpanel.android:annotations-compiler:0.1.0'
    }
}

This adds the annotations compiler tools to the classpath that gradle will use when finding plugins and running it's own scripts. The buildscript dependencies are different from the dependencies of your app - they're for build time only.

Then, apply the Mixpanel annotations plugin to your project by adding the following line to your gradle file

apply plugin: 'mixpanel-android-annotations'

That's all you have to do! The mixpanel-android-annotations plugin will use your annotations and call your methods when new tweak values are received from the Mixpanel API.

Setting custom default values

Tweaks can be set on any public method that takes a single String, double, long, or boolean argument. You can set up defaults in your code using @BooleanDefault, @DoubleDefault, @LongDefault, or @StringDefault. For example

import com.mixpanel.android.build.Tweak;
import com.mixpanel.android.build.LongDefault;

public class MyOtherGreatClass {
    @Tweak(name="Number of Pages to Show")
    @LongDefault(4)
    public void setNumberOfPages(long pages) {
        ...
    }
}
com.mixpanel.android

Mixpanel, Inc

Powerful, self-serve product analytics to help you convert, engage, and retain more users.

Версии библиотеки

Версия
0.1.0-RC1
0.1.0-BETA03
0.1.0-BETA02
0.1.0-BETA01