Skip to content
This repository has been archived by the owner on Jun 1, 2019. It is now read-only.

Commit

Permalink
Changed the package name and maven upload configuration\nThis should …
Browse files Browse the repository at this point in the history
…fix a packaging bug and make the package align with the chosen maven coordinates
  • Loading branch information
Machinarius committed Nov 22, 2013
1 parent 4b29ae4 commit a666872
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 16 deletions.
45 changes: 31 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,15 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
classpath 'com.github.dcendents:android-maven-plugin:1.0'
}
}

//Sonatype publishing configuration from
//http://www.vandalsoftware.com/post/52468430435/publishing-an-android-library-aar-to-a-maven
//This link succesfully made it so this project could install to the local repo...
//http://www.flexlabs.org/2013/06/using-local-aar-android-library-packages-in-gradle-builds

apply plugin: 'android-library'
apply plugin: 'android-maven'
apply plugin: 'maven'
apply plugin: 'signing'

version = '0.1'
group = 'com.github.kolavar'
version = '0.1.1'
group = 'com.github.machinarius'

dependencies {
compile 'com.android.support:support-v4:18.0.0'
Expand Down Expand Up @@ -53,19 +47,38 @@ android {
}
}

configurations {
archives {
extendsFrom configurations.default
}
ext {
artifactId = 'preferencefragment'
}

signing {
required { has("release") && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}

task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.allJava
}

task androidJavadocsJar(type: Jar) {
classifier = 'javadoc'
//basename = project.artifactId
from androidJavadocs.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
//basename = project.artifactId
from android.sourceSets.main.allSource
}

artifacts {
archives androidSourcesJar
archives androidJavadocsJar
}

uploadArchives {
configuration = configurations.archives

repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

Expand All @@ -74,6 +87,10 @@ uploadArchives {
password: sonatypePassword)
}

pom.groupId = 'com.github.machinarius'
pom.artifactId = 'preferencefragment'
pom.version = '0.1.1'

pom.project {
name 'Android Support PreferenceFragment'
packaging 'aar'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.github.kolavar.preferencefragment;
package com.github.machinarius.preferencefragment;

import android.content.Intent;
import android.os.Bundle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.github.kolavar.preferencefragment;
package com.github.machinarius.preferencefragment;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
Expand Down

0 comments on commit a666872

Please sign in to comment.