diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..74a7a9e --- /dev/null +++ b/build.gradle @@ -0,0 +1,91 @@ +group = 'com.hiczp' +version = '0.0.1' +description = 'Bilibili android client API library written in Java' + +apply plugin: 'idea' +apply plugin: 'java' +apply plugin: 'maven' + +repositories { + maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } + mavenCentral() +} + +dependencies { + // https://mvnrepository.com/artifact/com.squareup.retrofit2/retrofit + compile group: 'com.squareup.retrofit2', name: 'retrofit', version: '2.3.0' + // https://mvnrepository.com/artifact/com.squareup.retrofit2/converter-gson + compile group: 'com.squareup.retrofit2', name: 'converter-gson', version: '2.3.0' + // https://mvnrepository.com/artifact/com.google.code.gson/gson + compile group: 'com.google.code.gson', name: 'gson', version: '2.8.2' + // https://mvnrepository.com/artifact/com.squareup.okhttp3/logging-interceptor + compile group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '3.9.1' + // https://mvnrepository.com/artifact/org.slf4j/slf4j-api + compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25' + // https://mvnrepository.com/artifact/io.netty/netty-all + compile group: 'io.netty', name: 'netty-all', version: '4.1.19.Final' + // https://mvnrepository.com/artifact/com.google.guava/guava + compile group: 'com.google.guava', name: 'guava', version: '23.6-jre' +} + +dependencies { + // https://mvnrepository.com/artifact/junit/junit + testCompile group: 'junit', name: 'junit', version: '4.12' + // https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 + testCompile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25' +} + +task sourcesJar(type: Jar, dependsOn: classes) { + description 'Package source code to jar,' + classifier = 'sources' + from sourceSets.main.allSource +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + description 'Package javadoc to jar,' + classifier = 'javadoc' + from javadoc +} + +artifacts { + archives sourcesJar + archives javadocJar +} + +uploadArchives { + repositories { + mavenDeployer { + repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') { + authentication(userName: ossUsername, password: ossPassword) + } + + pom.project { + name project.name + description project.description + url 'https://github.com/czp3009/bilibili-api' + + scm { + connection 'scm:git@github.com:czp3009/bilibili-api.git' + developerConnection 'scm:git@github.com:czp3009/bilibili-api.git' + url 'git@github.com:czp3009/bilibili-api.git' + } + + licenses { + license { + name 'GNU GENERAL PUBLIC LICENSE Version 3' + url 'https://www.gnu.org/licenses/gpl-3.0.txt' + } + } + + developers { + developer { + id 'czp' + name 'ZhiPeng Chen' + email 'czp3009@gmail.com' + url 'https://www.hiczp.com/' + } + } + } + } + } +} diff --git a/pom.xml b/pom.xml deleted file mode 100644 index d615f9b..0000000 --- a/pom.xml +++ /dev/null @@ -1,155 +0,0 @@ - - - 4.0.0 - - com.hiczp - bilibili-api - bilibili-api - 0.0.1 - Bilibili API - https://github.com/czp3009/bilibili-api - - - - GNU GENERAL PUBLIC LICENSE Version 3 - https://www.gnu.org/licenses/gpl-3.0.txt - - - - - - czp - czp3009@gmail.com - https://www.hiczp.com/ - - - - - scm:git@github.com:czp3009/bilibili-api.git - scm:git@github.com:czp3009/bilibili-api.git - git@github.com:czp3009/bilibili-api.git - - - - - oss - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - - - com.squareup.retrofit2 - retrofit - 2.3.0 - - - - com.squareup.retrofit2 - converter-gson - 2.3.0 - - - - com.google.code.gson - gson - 2.8.2 - - - - com.squareup.okhttp3 - logging-interceptor - 3.9.0 - - - - org.slf4j - slf4j-api - 1.7.25 - - - - - junit - junit - 4.12 - test - - - - org.slf4j - slf4j-log4j12 - 1.7.25 - test - - - - commons-io - commons-io - 2.6 - test - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - UTF-8 - 1.8 - 1.8 - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar-no-fork - - - - - - - maven-javadoc-plugin - - - attach-javadoc - - jar - - - - - public - UTF-8 - UTF-8 - UTF-8 - - - - - maven-gpg-plugin - - - sign-artifacts - verify - - sign - - - - - - - - diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..6bfff3c --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name='bilibili-api'