diff --git a/library/build.gradle b/library/build.gradle index 75b08e1..fdf2e3e 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -9,11 +9,8 @@ buildscript { } apply plugin: 'com.android.library' -apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'kotlin-android' -//apply plugin: 'maven-publish' - - +apply plugin: 'com.github.dcendents.android-maven' android { compileSdkVersion 24 @@ -46,29 +43,4 @@ repositories { mavenCentral() } - -// build a jar with source files -task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' -} - -task javadoc(type: Javadoc) { - failOnError false - source = android.sourceSets.main.java.sourceFiles - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) - classpath += configurations.compile -} - -// build a jar with javadoc -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir -} - -artifacts { - archives sourcesJar - archives javadocJar -} - -//apply from: 'publish.gradle' +apply from: 'publish.gradle' diff --git a/library/publish.gradle b/library/publish.gradle index 1ddf31c..a294eae 100644 --- a/library/publish.gradle +++ b/library/publish.gradle @@ -1,19 +1,4 @@ - -group "$ext_groupId" -version "$ext_version" - -publishing { - publications { - MyPublication(MavenPublication) { - from components.java - artifact sourcesJar - groupId "$ext_groupId" - artifactId "$ext_artifactId" - version "$ext_version" - } - } -} - +// build a jar with source files task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' @@ -33,34 +18,35 @@ task javadocJar(type: Jar, dependsOn: javadoc) { } artifacts { - archives javadocJar archives sourcesJar + archives javadocJar } -bintray { - user = System.getenv('BINTRAY_USER') - key = System.getenv('BINTRAY_API_KEY') - - dryRun = false - publish = true - - publications = ['MyPublication'] - pkg { - repo = 'maven' - name = "$ext_artifactId" - licenses = ['Apache-2.0'] - labels = ['android', 'gradle-plugin'] - - publicDownloadNumbers = true - vcsUrl = "$ext_vcsUrl" - - version { - name = "$ext_version" - desc = "$ext_description" - released = new Date() - gpg { - sign = true // Determines whether to GPG sign the files. - } - } - } -} +// +//bintray { +// user = System.getenv('BINTRAY_USER') +// key = System.getenv('BINTRAY_API_KEY') +// +// dryRun = false +// publish = true +// +// publications = ['MyPublication'] +// pkg { +// repo = 'maven' +// name = "$ext_artifactId" +// licenses = ['Apache-2.0'] +// labels = ['android', 'gradle-plugin'] +// +// publicDownloadNumbers = true +// vcsUrl = "$ext_vcsUrl" +// +// version { +// name = "$ext_version" +// desc = "$ext_description" +// released = new Date() +// gpg { +// sign = true // Determines whether to GPG sign the files. +// } +// } +// } +//}