# AndroidPluginVersion

# AndroidPluginVersion

```
@Incubating class AndroidPluginVersion : Comparable<AndroidPluginVersion>
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                         ||
| ↳ | [com.android.build.api.AndroidPluginVersion](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#) |

Represents a version of the Android Gradle Plugin

Designed for plugin authors to compare the currently running plugin version

## Summary

|                                                                                                                                                                                                                ### Public constructors                                                                                                                                                                                                                ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [<init>](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#%3Cinit%3E(kotlin.Int,%20kotlin.Int))`(`major:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `minor:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                      |
| [<init>](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#%3Cinit%3E(kotlin.Int,%20kotlin.Int,%20kotlin.Int))`(`major:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `minor:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `micro:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> |

|                                                                                                                                                                                                                         ### Public methods                                                                                                                                                                                                                         ||
|----------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AndroidPluginVersion](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#) | [alpha](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#alpha(kotlin.Int))`(`alpha:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                               |
| [AndroidPluginVersion](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#) | [beta](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#beta(kotlin.Int))`(`beta:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                  |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                       | [compareTo](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#compareTo(com.android.build.api.AndroidPluginVersion))`(`other:` `[AndroidPluginVersion](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#)`)` <br /> |
| [AndroidPluginVersion](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#) | [dev](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#dev())`()` <br />                                                                                                                                                                                                  |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                               | [equals](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` <br />                                                                                            |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                       | [hashCode](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#hashCode())`()` <br />                                                                                                                                                                                        |
| [AndroidPluginVersion](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#) | [rc](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#rc(kotlin.Int))`(`rc:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                        |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                                                 | [toString](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#toString())`()` <br />                                                                                                                                                                                        |

|                                                                                                               ### Properties                                                                                                               ||
|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)        | [major](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#major:kotlin.Int) <br />                |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)        | [micro](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#micro:kotlin.Int) <br />                |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)        | [minor](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#minor:kotlin.Int) <br />                |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)        | [preview](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#preview:kotlin.Int) <br />            |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | [previewType](https://developer.android.com/reference/tools/gradle-api/7.0/com/android/build/api/AndroidPluginVersion#previewType:kotlin.String) <br /> |

## Public constructors

### \<init\>

```
AndroidPluginVersion(
    major: Int, 
    minor: Int)
```  

### \<init\>

```
AndroidPluginVersion(
    major: Int, 
    minor: Int, 
    micro: Int)
```

## Public methods

### alpha

```
fun alpha(alpha: Int): AndroidPluginVersion
```  

### beta

```
fun beta(beta: Int): AndroidPluginVersion
```  

### compareTo

```
fun compareTo(other: AndroidPluginVersion): Int
```  

### dev

```
fun dev(): AndroidPluginVersion
```  

### equals

```
fun equals(other: Any?): Boolean
```  

### hashCode

```
fun hashCode(): Int
```  

### rc

```
fun rc(rc: Int): AndroidPluginVersion
```  

### toString

```
fun toString(): String
```

## Properties

### major

```
val major: Int
```  

### micro

```
val micro: Int
```  

### minor

```
val minor: Int
```  

### preview

```
val preview: Int
```  

### previewType

```
val previewType: String?
```