-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from ProtonProtocol/develop
jcenter integration
- Loading branch information
Showing
8 changed files
with
173 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
plugins { | ||
id "com.eden.orchidPlugin" version "0.21.0" | ||
} | ||
|
||
dependencies { | ||
orchidRuntimeOnly "io.github.javaeden.orchid:OrchidDocs:0.21.0" | ||
orchidRuntimeOnly "io.github.javaeden.orchid:OrchidKotlindoc:0.21.0" | ||
orchidRuntimeOnly "io.github.javaeden.orchid:OrchidPluginDocs:0.21.0" | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
maven { url = "https://kotlin.bintray.com/kotlinx/" } | ||
} | ||
|
||
orchid { | ||
theme = "Editorial" | ||
baseUrl = "https://username.github.io/project" | ||
version = "1.0.0" | ||
} |
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,13 @@ | ||
site: | ||
about: | ||
siteName: Proton Kotlin SDK | ||
siteDescription: Kotlin library for handling Proton Chain operations. | ||
Editorial: | ||
primaryColor: '#582ACB' | ||
social: | ||
github: 'username/project' | ||
metaComponents: # this is the replacement for the deprecated automatic search addition | ||
- type: 'orchidSearch' | ||
kotlindoc: | ||
sourceDirs: | ||
- './../../../../protonsdk/src/main/java' |
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 @@ | ||
--- | ||
components: | ||
- type: 'pageContent' | ||
- type: 'readme' | ||
--- |
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ apply plugin: 'com.github.dcendents.android-maven' | |
|
||
android { | ||
compileSdkVersion 30 | ||
buildToolsVersion "30.0.0" | ||
buildToolsVersion "30.0.1" | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
|
@@ -23,8 +23,8 @@ android { | |
minSdkVersion 21 | ||
targetSdkVersion 30 | ||
|
||
versionCode 11 | ||
versionName "0.4.6" | ||
versionCode 13 | ||
versionName "0.5.1" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles 'consumer-rules.pro' | ||
|
@@ -61,7 +61,7 @@ dependencies { | |
implementation "androidx.work:work-runtime-ktx:2.3.4" | ||
|
||
// OkHttp | ||
def okhttp3_version = '4.7.2' | ||
def okhttp3_version = '4.8.0' | ||
implementation "com.squareup.okhttp3:okhttp:$okhttp3_version" | ||
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp3_version" | ||
|
||
|
@@ -102,18 +102,103 @@ dependencies { | |
//implementation "com.greymass:esrsdk:1.0.1" | ||
} | ||
|
||
ext { | ||
bintrayRepo = "ProtonKotlin" | ||
bintrayName = "com.metallicus.protonsdk" | ||
userOrganization = "protonprotocol" | ||
|
||
libraryName = "protonsdk" | ||
|
||
publishedGroupId = "com.metallicus" | ||
artifact = "protonsdk" | ||
libraryVersion = android.defaultConfig.versionName | ||
|
||
libraryDescription = "Kotlin library for handling Proton Chain operations" | ||
siteUrl = "https://github.com/ProtonProtocol/ProtonKotlin" | ||
gitUrl = "https://github.com/ProtonProtocol/ProtonKotlin.git" | ||
developerId = "joey-harward" | ||
developerName = "Metallicus Inc." | ||
developerEmail = "[email protected]" | ||
licenseName = "MIT License" | ||
licenseUrl = "https://opensource.org/licenses/MIT" | ||
allLicenses = ["MIT"] | ||
} | ||
|
||
group = publishedGroupId | ||
version = libraryVersion | ||
|
||
task sourcesJar(type: Jar) { | ||
archiveClassifier.set('sources') | ||
from android.sourceSets.main.java.srcDirs | ||
} | ||
|
||
def pomConfig = { | ||
licenses { | ||
license { | ||
name licenseName | ||
url licenseUrl | ||
} | ||
} | ||
developers { | ||
developer { | ||
id developerId | ||
name developerName | ||
email developerEmail | ||
} | ||
} | ||
scm { | ||
connection gitUrl | ||
developerConnection gitUrl | ||
url siteUrl | ||
} | ||
} | ||
|
||
project.afterEvaluate { | ||
publishing { | ||
publications { | ||
aar(MavenPublication) { | ||
ProtonSDKDebug(MavenPublication) { | ||
groupId = 'com.metallicus' | ||
artifactId 'protonsdk' | ||
artifactId = "${project.getName()}-debug" | ||
version = android.defaultConfig.versionName | ||
|
||
artifact bundleDebugAar | ||
|
||
pom.withXml { | ||
def dependenciesNode = asNode().appendNode('dependencies') | ||
def root = asNode() | ||
root.appendNode('name', libraryName) | ||
root.appendNode('description', libraryDescription) | ||
root.appendNode('url', siteUrl) | ||
root.children().last() + pomConfig | ||
|
||
def dependenciesNode = root.appendNode('dependencies') | ||
configurations.implementation.allDependencies.each { | ||
if (it.group != null && it.name != null && it.version != null && | ||
it.name != 'unspecified' && it.version != 'unspecified') { | ||
def dependencyNode = dependenciesNode.appendNode('dependency') | ||
dependencyNode.appendNode('groupId', it.group) | ||
dependencyNode.appendNode('artifactId', it.name) | ||
dependencyNode.appendNode('version', it.version) | ||
} | ||
} | ||
} | ||
} | ||
|
||
ProtonSDKRelease(MavenPublication) { | ||
groupId = 'com.metallicus' | ||
artifactId project.getName() | ||
version = android.defaultConfig.versionName | ||
|
||
artifact bundleReleaseAar | ||
artifact sourcesJar | ||
|
||
pom.withXml { | ||
def root = asNode() | ||
root.appendNode('name', libraryName) | ||
root.appendNode('description', libraryDescription) | ||
root.appendNode('url', siteUrl) | ||
root.children().last() + pomConfig | ||
|
||
def dependenciesNode = root.appendNode('dependencies') | ||
configurations.implementation.allDependencies.each { | ||
if (it.group != null && it.name != null && it.version != null && | ||
it.name != 'unspecified' && it.version != 'unspecified') { | ||
|
@@ -128,3 +213,40 @@ project.afterEvaluate { | |
} | ||
} | ||
} | ||
|
||
project.afterEvaluate { | ||
bintray { | ||
if (project.rootProject.file('local.properties').exists()) { | ||
Properties properties = new Properties() | ||
properties.load(project.rootProject.file('local.properties').newDataInputStream()) | ||
|
||
user = properties.getProperty("bintray.user") | ||
key = properties.getProperty("bintray.apikey") | ||
|
||
publications = ['ProtonSDKRelease'] | ||
|
||
pkg { | ||
repo = bintrayRepo | ||
name = bintrayName | ||
userOrg = userOrganization | ||
desc = libraryDescription | ||
websiteUrl = siteUrl | ||
vcsUrl = gitUrl | ||
licenses = allLicenses | ||
publish = true | ||
publicDownloadNumbers = true | ||
version { | ||
name = libraryVersion | ||
desc = libraryDescription | ||
released = new Date() | ||
|
||
// gpg { | ||
// sign = true //Determines whether to GPG sign the files. The default is false | ||
// passphrase = properties.getProperty("bintray.gpg.password") | ||
// //Optional. The passphrase for GPG signing' | ||
// } | ||
} | ||
} | ||
} | ||
} | ||
} |
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,4 @@ | ||
include ':protonsdk' | ||
rootProject.name = 'Proton Kotlin SDK' | ||
|
||
include ':protonsdk' | ||
include ':docs' |