Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Commit

Permalink
add apklib distribution and update docs to reflect
Browse files Browse the repository at this point in the history
  • Loading branch information
vinc3m1 committed Sep 11, 2013
1 parent 96fc911 commit 3ce1374
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 42 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ mvn android:deploy android:run
If you want to use the library, add this dependency:
```
<dependency>
<groupId>com.makeramen.rounded</groupId>
<artifactId>library</artifactId>
<groupId>com.makeramen</groupId>
<artifactId>roundedimageview-apklib</artifactId>
<version>1.0.0</version>
<type>apklib</type>
</dependency>
Expand Down
101 changes: 61 additions & 40 deletions roundedimageview/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
apply plugin: 'android-library'
// apply plugin: 'maven-publish'
apply plugin: 'maven'
apply plugin: 'signing'

group = 'com.makeramen'
archivesBaseName = 'roundedimageview'
version = '1.0.0'

android {
compileSdkVersion 18
Expand All @@ -14,25 +19,22 @@ android {
}
}

// android.libraryVariants
// publishing {
// publications {
// maven(MavenPublication) {
// artifact bundleRelease
// }
// }
// repositories {
// maven {
// url "file://$buildDir/../../../ark/releases"
// }
// }
// }
task apklib(type: Zip) {
dependsOn 'packageReleaseJar'
appendix = extension = 'apklib'

apply plugin: 'maven'
apply plugin: 'signing'
from 'AndroidManifest.xml'
into('res') {
from 'res'
}
into('src') {
from 'src'
}
}

group = 'com.makeramen'
version = '1.0.0'
artifacts {
archives apklib
}

configurations {
archives {
Expand All @@ -54,32 +56,51 @@ uploadArchives {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}

pom.project {
name 'RoundedImageView'
packaging 'aar'
description 'Fast ImageView with support for rounded corners and borders'
url 'https://github.com/vinc3m1/RoundedImageView'
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}

scm {
url 'scm:[email protected]:vinc3m1/RoundedImageView.git'
connection 'scm:[email protected]:vinc3m1/RoundedImageView.git'
developerConnection 'scm:[email protected]:vinc3m1/RoundedImageView.git'
}
modifyPom(addFilter('aar') { artifact, file ->
artifact.name == archivesBaseName
})

modifyPom(addFilter('apklib') { artifact, file ->
artifact.name == archivesBaseName + '-apklib'
})

// There's no official apklib for Google Play services, so we
// can't really maintain that dependency for the apklib packaging.
pom('apklib').whenConfigured { pom ->
pom.dependencies = []
}
}
}

def modifyPom(pom) {
pom.project {
name 'RoundedImageView'
description 'Fast ImageView with support for rounded corners and borders'
url 'https://github.com/vinc3m1/RoundedImageView'

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
scm {
url 'scm:[email protected]:vinc3m1/RoundedImageView.git'
connection 'scm:[email protected]:vinc3m1/RoundedImageView.git'
developerConnection 'scm:[email protected]:vinc3m1/RoundedImageView.git'
}

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}

developers {
developer {
id 'vinc3m1'
name 'Vince Mi'
email '[email protected]'
}
developers {
developer {
id 'vinc3m1'
name 'Vince Mi'
email '[email protected]'
}
}
}
Expand Down

0 comments on commit 3ce1374

Please sign in to comment.