Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.lightfire:Android-Gradient-Text-Color:'
}
dependencies {
implementation("com.github.lightfire:Android-Gradient-Text-Color:")
}
<dependency>
<groupId>com.github.lightfire</groupId>
<artifactId>Android-Gradient-Text-Color</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.lightfire" % "Android-Gradient-Text-Color" % ""
:dependencies [[com.github.lightfire/Android-Gradient-Text-Color ""]]
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
dependencies {
compile 'com.github.lightfire:Android-Gradient-Text-Color:b0047755f7'
}
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.lightfire</groupId>
<artifactId>Android-Gradient-Text-Color</artifactId>
<version>e66cd5cf65</version>
</dependency>
#Button
<com.lightfire.gradienttextcolor.GradientButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hello World! Button"
app:gradientStart="@color/test1"
app:gradientEnd="@color/test2"
android:textStyle="bold"
android:textSize="30sp"
android:textColor="#d83737" />
#TextView
<com.lightfire.gradienttextcolor.GradientTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hello World! Text"
app:gradientStart="@color/test2"
app:gradientEnd="@color/test1"
android:textStyle="bold"
android:textSize="30sp"
android:textColor="#d83737" />
app:gradientStart
app:gradientEnd
tags your textColor has no meaning.
MIT