-
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 #4 from ProtonProtocol/develop
Covert to Gradle Kotlin
- Loading branch information
Showing
16 changed files
with
588 additions
and
378 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 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,48 @@ | ||
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties | ||
|
||
buildscript { | ||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath(BuildPlugins.androidGradlePlugin) | ||
} | ||
} | ||
|
||
plugins { | ||
kotlin("jvm") version kotlinVersion | ||
id(BuildPlugins.dokka) version BuildPlugins.Versions.dokka | ||
id(BuildPlugins.orchid) version orchidVersion | ||
`maven-publish` | ||
id(BuildPlugins.bintray) version BuildPlugins.Versions.bintray | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
} | ||
|
||
dependencies { | ||
orchidRuntimeOnly(Libraries.orchidDocs) | ||
orchidRuntimeOnly(Libraries.orchidKotlindoc) | ||
orchidRuntimeOnly(Libraries.orchidPluginDocs) | ||
orchidRuntimeOnly(Libraries.orchidGithub) | ||
} | ||
|
||
orchid { | ||
theme = "Editorial" | ||
version = ProtonSdk.versionName | ||
srcDir = "protonsdk/src/orchid/resources" | ||
destDir = "protonsdk/build/docs/orchid" | ||
baseUrl = "https://protonprotocol.github.io/ProtonKotlin" | ||
|
||
githubToken = gradleLocalProperties(rootDir).getProperty("github.token") | ||
} | ||
|
||
tasks.register("cleanAll").configure { | ||
delete("build", "buildSrc/build", "protonsdk/build") | ||
} |
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,11 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
} | ||
|
||
kotlinDslPluginOptions { | ||
experimentalWarning.set(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 |
---|---|---|
@@ -0,0 +1 @@ | ||
rootProject.name = "DSL" |
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,142 @@ | ||
/* | ||
* Copyright (c) 2020 Proton Chain LLC, Delaware | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
const val kotlinVersion = "1.3.72" | ||
const val orchidVersion = "0.21.1" | ||
|
||
object ProtonSdk { | ||
const val versionCode = 14 | ||
const val versionName = "0.5.2" | ||
} | ||
|
||
object BuildPlugins { | ||
object Versions { | ||
const val gradle = "4.0.1" | ||
const val dokka = "0.10.1" | ||
const val bintray = "1.8.5" | ||
} | ||
|
||
const val androidGradlePlugin = "com.android.tools.build:gradle:${Versions.gradle}" | ||
const val androidLibrary = "com.android.library" | ||
const val kotlinAndroid = "android" | ||
const val kotlinAndroidExtensions = "android.extensions" | ||
const val kotlinKapt = "kapt" | ||
const val mavenPublish = "maven-publish" | ||
const val dokka = "org.jetbrains.dokka" | ||
const val orchid = "com.eden.orchidPlugin" | ||
const val bintray = "com.jfrog.bintray" | ||
} | ||
|
||
object Android { | ||
const val minSdk = 21 | ||
const val compileSdk = 30 | ||
const val targetSdk = compileSdk | ||
const val buildTools = "30.0.1" | ||
|
||
object Progaurd { | ||
const val consumeFile = "consumer-rules.pro" | ||
const val optimizeFile = "proguard-android-optimize.txt" | ||
const val rulesFile = "proguard-rules.pro" | ||
} | ||
} | ||
|
||
object Libraries { | ||
private object Versions { | ||
const val ktx = "1.5.0-alpha01" | ||
const val lifecycleLiveData = "2.3.0-alpha05" | ||
const val room = "2.2.5" | ||
const val workManager = "2.3.4" | ||
const val okhttp3 = "4.8.0" | ||
const val retrofit = "2.9.0" | ||
const val dagger = "2.28.1" | ||
const val daggerAssistedInject = "0.5.2" | ||
const val coroutines = "1.3.4" | ||
const val timber = "4.7.1" | ||
const val gson = "2.8.6" | ||
const val guava = "29.0-jre" | ||
} | ||
|
||
const val kotlinStdLib = "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" | ||
const val ktxCore = "androidx.core:core-ktx:${Versions.ktx}" | ||
const val lifeCycleLiveData = "androidx.lifecycle:lifecycle-livedata-ktx:${Versions.lifecycleLiveData}" | ||
const val roomKtx = "androidx.room:room-ktx:${Versions.room}" | ||
const val roomCompiler = "androidx.room:room-compiler:${Versions.room}" | ||
const val workManagerKtx = "androidx.work:work-runtime-ktx:${Versions.workManager}" | ||
const val okhttp3 = "com.squareup.okhttp3:okhttp:${Versions.okhttp3}" | ||
const val okhttp3Logging = "com.squareup.okhttp3:logging-interceptor:${Versions.okhttp3}" | ||
const val retrofit = "com.squareup.retrofit2:retrofit:${Versions.retrofit}" | ||
const val retrofitGsonConverter = "com.squareup.retrofit2:converter-gson:${Versions.retrofit}" | ||
const val dagger = "com.google.dagger:dagger:${Versions.dagger}" | ||
const val daggerAndroidSupport = "com.google.dagger:dagger-android-support:${Versions.dagger}" | ||
const val daggerAndroidProcessor = "com.google.dagger:dagger-android-processor:${Versions.dagger}" | ||
const val daggerAndroidCompiler = "com.google.dagger:dagger-compiler:${Versions.dagger}" | ||
const val daggerAssistedInjectAnnotations = "com.squareup.inject:assisted-inject-annotations-dagger2:${Versions.daggerAssistedInject}" | ||
const val daggerAssistedInjectProcessor = "com.squareup.inject:assisted-inject-processor-dagger2:${Versions.daggerAssistedInject}" | ||
const val coroutinesCore = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.coroutines}" | ||
const val coroutinesAndroid = "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.coroutines}" | ||
const val timber = "com.jakewharton.timber:timber:${Versions.timber}" | ||
const val gson = "com.google.code.gson:gson:${Versions.gson}" | ||
const val guava = "com.google.guava:guava:${Versions.guava}" | ||
const val orchidDocs = "io.github.javaeden.orchid:OrchidDocs:$orchidVersion" | ||
const val orchidKotlindoc = "io.github.javaeden.orchid:OrchidKotlindoc:$orchidVersion" | ||
const val orchidPluginDocs = "io.github.javaeden.orchid:OrchidPluginDocs:$orchidVersion" | ||
const val orchidGithub = "io.github.javaeden.orchid:OrchidGithub:$orchidVersion" | ||
|
||
// Greymass ESR | ||
//implementation "com.greymass:esrsdk:1.0.1" | ||
} | ||
|
||
object TestLibraries { | ||
private object Versions { | ||
const val junit = "4.13" | ||
const val testExt = "1.1.1" | ||
const val espresso = "3.2.0" | ||
} | ||
const val junit = "junit:junit:${Versions.junit}" | ||
const val testExt = "androidx.test.ext:junit:${Versions.testExt}" | ||
const val espresso = "androidx.test.espresso:espresso-core:${Versions.espresso}" | ||
const val testRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
object Publishing { | ||
object Publications { | ||
const val debug = "ProtonSDKDebug" | ||
const val release = "ProtonSDKRelease" | ||
} | ||
const val bintrayRepo = "ProtonKotlin" | ||
const val bintrayName = "com.metallicus.protonsdk" | ||
const val userOrganization = "protonprotocol" | ||
|
||
const val libraryName = "protonsdk" | ||
const val libraryVersion = ProtonSdk.versionName | ||
|
||
const val publishedGroupId = "com.metallicus" | ||
|
||
const val libraryDescription = "Kotlin library for handling Proton Chain operations" | ||
const val siteUrl = "https://github.com/ProtonProtocol/ProtonKotlin" | ||
const val gitUrl = "https://github.com/ProtonProtocol/ProtonKotlin.git" | ||
const val developerId = "joey-harward" | ||
const val developerName = "Metallicus Inc." | ||
const val developerEmail = "[email protected]" | ||
const val licenseName = "MIT License" | ||
const val licenseUrl = "https://opensource.org/licenses/MIT" | ||
const val allLicenses = "MIT" | ||
} |
Oops, something went wrong.