split repo

This commit is contained in:
Alexey Kuznetsov 2017-02-24 16:47:52 +03:00
commit b51acd730f
3 changed files with 95 additions and 5 deletions

View file

@ -1,4 +1,22 @@
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}
repositories {
jcenter()
mavenLocal()
}
apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'com.github.dcendents.android-maven' // 'gradle install' task
android {
compileSdkVersion 25
@ -8,7 +26,7 @@ android {
minSdkVersion 9
targetSdkVersion 25
versionCode 1
versionName "1.0"
versionName "0.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@ -21,6 +39,81 @@ android {
}
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(project.android.getBootClasspath().join(File.pathSeparator))
android.libraryVariants.all { variant ->
classpath += files(variant.javaCompile.classpath.files)
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
group = "com.github.axet"
archivesBaseName = "android-audio-library"
version = android.defaultConfig.versionName
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Android Library'
packaging 'jar'
// optionally artifactId can be defined here
description 'Android Simple Widgets and Support classes.'
url 'https://gitlab.com/axet/android-audio-library'
scm {
connection 'scm:git:https://gitlab.com/axet/android-library'
developerConnection 'scm:git:https://gitlab.com/axet/android-library'
url 'https://gitlab.com/axet/android-audio-library'
}
licenses {
license {
name 'GNU LESSER GENERAL PUBLIC LICENSE 3.0'
url 'http://www.gnu.org/copyleft/lesser.html'
}
}
developers {
developer {
id 'axet'
name 'Alexey Kuznetsov'
email 'axet@me.com'
}
}
}
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
@ -34,5 +127,4 @@ dependencies {
compile 'com.github.axet:jebml:0.0.2' // compile project(':jebml')
compile 'com.github.axet:vorbis:1.0.0' // compile project(':vorbis')
testCompile 'junit:junit:4.12'
compile project(path: ':android-library')
}

View file

@ -45,5 +45,5 @@ dependencies {
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:support-v4:25.2.0'
compile project(':android-audio-library')
compile 'com.github.axet:android-audio-library:0.0.1' // compile project(':android-audio-library')
}

View file

@ -764,7 +764,6 @@ public class RecordingActivity extends AppCompatActivity {
EncoderInfo getInfo() {
final int channels = MainApplication.getChannels(this);
final int bps = Sound.AUDIO_FORMAT == AudioFormat.ENCODING_PCM_16BIT ? 16 : 8;
return new EncoderInfo(channels, sampleRate, bps);
}
@ -859,7 +858,6 @@ public class RecordingActivity extends AppCompatActivity {
@Override
public void finish() {
super.finish();
MainActivity.startActivity(this);
}
}