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.SKART1:adb-exe:1.0.36'
}
dependencies {
implementation("com.github.SKART1:adb-exe:1.0.36")
}
<dependency>
<groupId>com.github.SKART1</groupId>
<artifactId>adb-exe</artifactId>
<version>1.0.36</version>
</dependency>
libraryDependencies += "com.github.SKART1" % "adb-exe" % "1.0.36"
:dependencies [[com.github.SKART1/adb-exe "1.0.36"]]
Repo with adb from android-sdk as artifact
All rights to adb executable belongs to it`s respected owners. Goal of this repository is only to give more flexibility for using this artifacts
At this moment this artifact is not present in any official maven repositories. But you may use jitpack.io an awesome project which pareses open-source projects on github, produces artifacts and hold them. How to tune it see documentation
If you are using maven
there is maven-dependency-plugin
which allows you to copy this dependency anywhere you desire:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>unpack-dependency</id>
<phase>compile</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<ignorePermissions>false</ignorePermissions>
<artifactItems>
<artifactItem>
<groupId>com.github.SKART1</groupId>
<artifactId>adb-exe</artifactId>
<version>aa77dc91cf</version>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${basedir}/src/main/resources/containers/shared/adb</outputDirectory>
<destFileName>adb</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
Flat. To make artifacts flat you may use maven-antrun-plugin
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<configuration>
<tasks>
<move todir="${basedir}/src/main/resources/containers/shared/adb">
<fileset dir="${basedir}/src/main/resources/containers/shared/adb"/>
<mapper type="flatten"/>
</move>
</tasks>
</configuration>
</plugin>