TIL how to implement and distribute a library.
This is a sample implementation of library for Android project.
minSdkVersion 19
Gradle:
repositories {
・
・
・
maven { url 'http://raw.githubusercontent.com/kfurue/LibImplementSample/master/repository/'}
}
・
・
・
dependencies {
・
・
・
compile 'com.example.librarytest:librarytest:1.0.0'
}
SampleLibrary requires at Android 4.4.
MainActivity.java:
import com.example.librarytest.SampleLibrary;
new SampleLibrary().sampleMethod();
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT