-
Notifications
You must be signed in to change notification settings - Fork 74
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
1 parent
daa1438
commit 2a53a2e
Showing
8 changed files
with
137 additions
and
103 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
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
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 |
---|---|---|
@@ -1,74 +1,78 @@ | ||
//apply plugin: 'maven' | ||
// | ||
//Properties properties = new Properties() | ||
//properties.load(project.rootProject.file('scripts/maven.properties').newDataInputStream()) | ||
//properties.load(new FileInputStream("${projectDir}/pom.properties")) | ||
// | ||
// | ||
//if (new File("local.properties").exists()) { | ||
// properties.load(project.rootProject.file('local.properties').newDataInputStream()) | ||
//} | ||
// | ||
//def user = System.getenv("BINTARY_USER") | ||
//def apiKey = System.getenv("BINTARY_APIKEY") | ||
//def repo = System.getenv("BINTARY_REPO") | ||
// | ||
//if (user == null || user.length() == 0) { | ||
// user = properties.user | ||
//} | ||
// | ||
//if (apiKey == null || apiKey.length() == 0) { | ||
// apiKey = properties.apiKey | ||
//} | ||
// | ||
//if (repo == null || repo.length() == 0) { | ||
// repo = properties.releasesRepository | ||
//} | ||
// | ||
//apply plugin: 'maven' | ||
// | ||
//uploadArchives { | ||
// repositories { | ||
// mavenDeployer { | ||
// pom.groupId = properties.groupId | ||
// pom.artifactId = properties.artifactId | ||
// pom.version = rootProject.ext.Version | ||
// | ||
// pom.project { | ||
// name 'APNG4Android' | ||
// description 'Android animation support for APNG & Animated WebP & Gif' | ||
// url 'https://github.com/penfeizhou/APNG4Android' | ||
// licenses { | ||
// license { | ||
// name = 'The Apache License, Version 2.0' | ||
// url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
// } | ||
// } | ||
// developers { | ||
// developer { | ||
// id = 'penfeizhou' | ||
// name = 'osborn' | ||
// } | ||
// } | ||
apply plugin: 'maven-publish' | ||
|
||
Properties properties = new Properties() | ||
properties.load(project.rootProject.file('scripts/maven.properties').newDataInputStream()) | ||
properties.load(new FileInputStream("${projectDir}/pom.properties")) | ||
|
||
|
||
if (new File("local.properties").exists()) { | ||
properties.load(project.rootProject.file('local.properties').newDataInputStream()) | ||
} | ||
|
||
def user = System.getenv("BINTARY_USER") | ||
def apiKey = System.getenv("BINTARY_APIKEY") | ||
def repo = System.getenv("BINTARY_REPO") | ||
|
||
if (user == null || user.length() == 0) { | ||
user = properties.user | ||
} | ||
|
||
if (apiKey == null || apiKey.length() == 0) { | ||
apiKey = properties.apiKey | ||
} | ||
|
||
if (repo == null || repo.length() == 0) { | ||
repo = properties.releasesRepository | ||
} | ||
println("User:${user}") | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
groupId = properties.groupId | ||
artifactId = properties.artifactId | ||
version = rootProject.ext.Version | ||
pom { | ||
name = 'APNG4Android' | ||
description = 'Android animation support for APNG & Animated WebP & Gif' | ||
url = 'https://github.com/penfeizhou/APNG4Android' | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'osborn' | ||
name = 'Pengfei Zhou' | ||
email = 'pengfeizhou@foxmail.com' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:git@github.com:penfeizhou/APNG4Android.git' | ||
url = 'https://github.com/penfeizhou/APNG4Android' | ||
} | ||
} | ||
afterEvaluate { | ||
from components.release | ||
} | ||
} | ||
} | ||
repositories { | ||
// maven { | ||
// name = 'myrepo' | ||
// url = "${project.buildDir}/repo" | ||
// } | ||
// | ||
// repository(url: repo) { | ||
// authentication(userName: user, password: apiKey) | ||
// } | ||
// } | ||
// } | ||
//} | ||
// | ||
//task uploadAar { | ||
// dependsOn clean, uploadArchives | ||
//} | ||
// | ||
//// 打包时上传源码,可选 | ||
//task androidSourcesJar(type: Jar) { | ||
// classifier = "sources" | ||
// from android.sourceSets.main.java.sourceFiles | ||
//} | ||
// | ||
//artifacts { | ||
// archives androidSourcesJar | ||
//} | ||
maven { | ||
name = 'MavenCentral' | ||
url = repo | ||
credentials { | ||
username user | ||
password apiKey | ||
} | ||
} | ||
} | ||
} | ||
} |