-
Notifications
You must be signed in to change notification settings - Fork 27
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
22 changed files
with
262 additions
and
274 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
apply plugin: 'com.android.library' | ||
plugins { | ||
id 'com.android.library' | ||
} | ||
|
||
android { | ||
compileSdkVersion 30 | ||
|
@@ -13,6 +15,7 @@ android { | |
consumerProguardFiles "consumer-rules.pro" | ||
externalNativeBuild { | ||
cmake { | ||
arguments "-DANDROID_ARM_NEON=OFF" | ||
cppFlags "-std=c++14" | ||
} | ||
} | ||
|
@@ -36,70 +39,18 @@ android { | |
|
||
dependencies { | ||
implementation fileTree(dir: "libs", include: ["*.jar"]) | ||
implementation 'androidx.appcompat:appcompat:1.2.0' | ||
implementation 'androidx.annotation:annotation:1.1.0' | ||
testImplementation 'junit:junit:4.12' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.1' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | ||
implementation 'androidx.appcompat:appcompat:1.3.1' | ||
implementation 'androidx.annotation:annotation:1.2.0' | ||
testImplementation 'junit:junit:4.13.2' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.3' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' | ||
} | ||
|
||
// PUBLISH | ||
|
||
//JCenter | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
apply plugin: 'com.jfrog.bintray' | ||
|
||
def artifact = new Properties() | ||
artifact.load(new FileInputStream("deploy.settings")) | ||
|
||
version=artifact.version | ||
group=artifact.groupId | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
pom.project { | ||
packaging 'aar' | ||
groupId artifact.groupId | ||
artifactId artifact.id | ||
version artifact.version | ||
name artifact.id // pom.project.name must be same as bintray.pkg.name | ||
url artifact.siteUrl | ||
inceptionYear '2020' // HARDCODED | ||
licenses { | ||
license { // HARDCODED | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
} | ||
} | ||
scm { | ||
connection artifact.gitUrl | ||
developerConnection artifact.gitUrl | ||
url artifact.siteUrl | ||
} | ||
} | ||
} | ||
} | ||
|
||
def properties = new Properties() | ||
properties.load(new FileInputStream("local.properties")) | ||
|
||
bintray { | ||
user = properties.getProperty("bintray.user") | ||
key = properties.getProperty("bintray.apikey") | ||
|
||
configurations = ['archives'] | ||
pkg { | ||
repo = "Aghajari" | ||
name = artifact.id | ||
websiteUrl = artifact.siteUrl | ||
vcsUrl = artifact.gitUrl | ||
licenses = artifact.licenses | ||
publish = true | ||
version { | ||
name = artifact.version | ||
} | ||
} | ||
} | ||
apply plugin: 'maven' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
task sourcesJar(type: Jar) { | ||
from android.sourceSets.main.java.srcDirs | ||
|
@@ -111,6 +62,12 @@ task javadoc(type: Javadoc) { | |
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
} | ||
|
||
afterEvaluate { | ||
javadoc.classpath += files(android.libraryVariants.collect { variant -> | ||
variant.javaCompileProvider.get().classpath.files | ||
}) | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
from javadoc.destinationDir | ||
|
@@ -121,13 +78,65 @@ artifacts { | |
archives sourcesJar | ||
} | ||
|
||
repositories { | ||
maven { url 'https://maven.google.com' } | ||
mavenCentral() | ||
signing { | ||
useInMemoryPgpKeys( | ||
rootProject.ext["signing.keyId"], | ||
rootProject.ext["signing.key"], | ||
rootProject.ext["signing.password"], | ||
) | ||
sign publishing.publications | ||
} | ||
|
||
tasks.withType(Javadoc) { | ||
options.addStringOption('Xdoclint:none', '-quiet') | ||
options.addStringOption('encoding', 'UTF-8') | ||
options.addStringOption('charSet', 'UTF-8') | ||
} | ||
} | ||
|
||
def artifact = new Properties() | ||
artifact.load(new FileInputStream("deploy.settings")) | ||
|
||
version = artifact.version | ||
group = artifact.groupId | ||
archivesBaseName = artifact.id | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
groupId artifact.groupId | ||
artifactId artifact.id | ||
version artifact.version | ||
from components.release | ||
|
||
pom { | ||
name = artifact.id | ||
packaging = 'aar' | ||
description = 'AXrLottie (Android) Renders animations and vectors exported in the bodymovin JSON format. (Using rLottie)' | ||
url = artifact.siteUrl | ||
|
||
scm { | ||
connection = artifact.gitUrl | ||
developerConnection = artifact.gitUrl | ||
url = artifact.siteUrl | ||
} | ||
|
||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'Aghajari' | ||
name = 'AmirHossein Aghajari' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
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
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
Oops, something went wrong.