Friday, April 29, 2016

GRALDE - add custom external *.jar to module dependencies

1. An example is map-visualiser project from github
2. Clone that project and make gradlew build for it
3. It will build its *.jar inside of /build/libs
4. Create libs dir inside your module
5. Copy/past that *.jar into your module libs dir 
6. Add these LOCs below into module's build.gradle and build the project:

repositories {
    mavenCentral()
    flatDir {
        dirs 'libs'    
    }
}

dependencies {    
    compile name: 'map-visualiser-1.0'
    testCompile group: 'junit', name: 'junit', version: '4.11'
}

No comments: