forked from BigBadaboom/androidsvg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
52 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,60 +4,47 @@ | |
|
||
//apply plugin: 'java-library' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
|
||
def version = '1.5' | ||
//version = '1.3-SNAPSHOT' | ||
def versionName = '1.6' | ||
|
||
def libraryName = 'AndroidSVG' | ||
def libraryDescription = 'SVG rendering library for Android.' | ||
|
||
def artifactIdAAR = 'androidsvg-aar' | ||
def artifactIdJAR = 'androidsvg' | ||
def group = 'com.caverock' | ||
|
||
def developerId = 'BigBadaboom' | ||
def developerName = 'Paul LeBeau' | ||
def developerEmail = '[email protected]' | ||
|
||
def siteUrl = 'https://github.com/BigBadaboom/androidsvg' | ||
def gitUrl = 'https://github.com/BigBadaboom/androidsvg.git' | ||
def siteUrl = 'https://github.com/xmindltd/androidsvg' | ||
def gitUrl = 'https://github.com/xmindltd/androidsvg.git' | ||
|
||
def licenseName = 'The Apache Software License, Version 2.0' | ||
def licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
|
||
def releaseRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
def snapshotRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
|
||
|
||
publishing { | ||
repositories { | ||
maven { | ||
url = version.endsWith('SNAPSHOT') ? snapshotRepoUrl : releaseRepoUrl | ||
credentials { | ||
// These are set in ~/.gradle/gradle.properties | ||
username project.sonatypeUsername | ||
password project.sonatypePassword | ||
} | ||
// change URLs to point to your repos, e.g. http://my.org/repo | ||
def releasesRepoUrl = layout.buildDirectory.dir('repos/releases') | ||
def snapshotsRepoUrl = layout.buildDirectory.dir('repos/snapshots') | ||
url = versionName.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
} | ||
} | ||
|
||
publications { | ||
|
||
mavenAAR(MavenPublication) { | ||
artifactId = artifactIdAAR | ||
groupId = group | ||
artifactId = artifactIdAAR | ||
version = versionName | ||
|
||
artifact("${buildDir}/outputs/aar/androidsvg-release.aar") { | ||
// wrap in a closure because this task isn't defined 'till | ||
// the android plugin finishes | ||
builtBy { tasks["assembleRelease"] } | ||
} | ||
afterEvaluate { | ||
artifact sourcesJar | ||
artifact javadocJar | ||
} | ||
|
||
pom { | ||
packaging = 'aar' | ||
|
@@ -87,90 +74,5 @@ publishing { | |
} | ||
} | ||
} | ||
|
||
mavenJAR(MavenPublication) { | ||
artifactId = artifactIdJAR | ||
groupId = group | ||
|
||
afterEvaluate { | ||
artifact libraryJar | ||
artifact sourcesJar | ||
artifact javadocJar | ||
} | ||
|
||
pom { | ||
packaging = 'jar' | ||
|
||
name = libraryName | ||
description = libraryDescription | ||
url = siteUrl | ||
|
||
licenses { | ||
license { | ||
name = licenseName | ||
url = licenseUrl | ||
distribution = 'repo' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = developerId | ||
name = developerName | ||
email = developerEmail | ||
} | ||
} | ||
scm { | ||
connection = gitUrl | ||
developerConnection = gitUrl | ||
url = siteUrl | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
task sourcesJar(type: Jar) { | ||
from android.sourceSets.main.java.srcDirs | ||
classifier 'sources' | ||
} | ||
|
||
task javadoc(type: Javadoc) { | ||
source = android.sourceSets.main.java.srcDirs | ||
destinationDir = new File("$rootProject.projectDir/doc/") | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
options { | ||
links "http://docs.oracle.com/javase/7/docs/api/" | ||
linksOffline "http://d.android.com/reference", "${android.sdkDirectory}/docs/reference" | ||
// Replacement stylesheet for javadocs | ||
stylesheetFile = new File(projectDir, "javadoc-stylesheet.css") | ||
} | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier 'javadoc' | ||
from javadoc.getDestinationDir() | ||
} | ||
|
||
task libraryJar(type: Jar, dependsOn: 'compileReleaseJavaWithJavac') { | ||
from { | ||
compileReleaseJavaWithJavac.destinationDir | ||
} | ||
|
||
// Add all dependencies except for android.jar to the fat jar | ||
from { | ||
configurations.compile.findAll { | ||
it.getName() != 'android.jar' && | ||
!it.getName().startsWith('junit') | ||
}.collect { | ||
it.isDirectory() ? it : zipTree(it) | ||
} | ||
} | ||
|
||
archiveName "${artifactIdJAR}-${version}.jar" | ||
} | ||
|
||
signing { | ||
sign publishing.publications.mavenAAR | ||
sign publishing.publications.mavenJAR | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
plugins { | ||
alias(libs.plugins.android.application) apply false | ||
alias(libs.plugins.kotlin.android) apply false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
android.useAndroidX=true | ||
android.defaults.buildfeatures.buildconfig=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[versions] | ||
agp = "8.6.0" | ||
kotlin = "1.9.0" | ||
|
||
[libraries] | ||
|
||
[plugins] | ||
android-application = { id = "com.android.application", version.ref = "agp" } | ||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Wed Sep 02 00:41:47 NZST 2020 | ||
#Tue Nov 26 10:03:07 CST 2024 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
pluginManagement { | ||
repositories { | ||
google { | ||
content { | ||
includeGroupByRegex("com\\.android.*") | ||
includeGroupByRegex("com\\.google.*") | ||
includeGroupByRegex("androidx.*") | ||
} | ||
} | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
} | ||
dependencyResolutionManagement { | ||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
include(":androidsvg") |