Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
<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.axlecho:tuxguitar:0.1.4'
}
<dependency>
<groupId>com.github.axlecho</groupId>
<artifactId>tuxguitar</artifactId>
<version>0.1.4</version>
</dependency>
libraryDependencies += "com.github.axlecho" % "tuxguitar" % "0.1.4"
:dependencies [[com.github.axlecho/tuxguitar "0.1.4"]]
由tuxguitar-android项目修改而来的android控件(Activity) 用于播放GP4,GP5,GPX文件
With Gradle:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
api 'com.github.axlecho.tuxguitar:tuxguitar-ptb:v0.1.1'
api 'com.github.axlecho.tuxguitar:tuxguitar-gtp:v0.1.1'
api 'com.github.axlecho.tuxguitar:tuxguitar-lib:v0.1.1'
api 'com.github.axlecho.tuxguitar:tuxguitar-gm-utils:v0.1.1'
api 'com.github.axlecho.tuxguitar:tuxguitar-editor-utils:v0.1.1'
api 'com.github.axlecho.tuxguitar:tuxguitar-gpx:v0.1.1'
api 'com.github.axlecho.tuxguitar:tuxguitar-widget:v0.1.1'
api 'com.github.axlecho.tuxguitar:tuxguitar-android-gervill:v0.1.1'
Uri gtpUri = Uri.parse("file://" + filePath);
Intent intent = new Intent();
intent.setData(gtpUri);
Bundle bundle = new Bundle();
bundle.putSerializable("title", JtsTextUnitls.getFileNameFromPath(filePath));
intent.putExtras(bundle);
intent.setAction(Intent.ACTION_VIEW);
intent.setClass(context, TGActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);