mirror of
https://github.com/Instadapp/chains.git
synced 2024-07-29 22:37:19 +00:00
Split out the model to extra module
This commit is contained in:
parent
4aa4314d51
commit
dfba60a7b8
26
build.gradle
26
build.gradle
|
@ -14,30 +14,4 @@ buildscript {
|
|||
}
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
apply plugin: "application"
|
||||
apply plugin: "com.github.ben-manes.versions"
|
||||
|
||||
mainClassName = "org.ethereum.lists.chains.MainKt"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:${KOTLIN_VERSION}"
|
||||
|
||||
implementation "com.github.komputing.kethereum:rpc:${KETHEREUM_VERSION}"
|
||||
implementation "com.github.komputing.kethereum:model:${KETHEREUM_VERSION}"
|
||||
implementation "com.github.komputing.kethereum:erc55:${KETHEREUM_VERSION}"
|
||||
implementation "com.github.komputing.kethereum:crypto_impl_bouncycastle:${KETHEREUM_VERSION}"
|
||||
|
||||
implementation 'com.beust:klaxon:5.5'
|
||||
implementation 'com.squareup.moshi:moshi-kotlin:1.13.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
|
||||
|
||||
testImplementation "org.jetbrains.kotlin:kotlin-test:${KOTLIN_VERSION}"
|
||||
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:${KOTLIN_VERSION}"
|
||||
}
|
||||
|
||||
|
|
15
model/build.gradle
Normal file
15
model/build.gradle
Normal file
|
@ -0,0 +1,15 @@
|
|||
apply plugin: "kotlin"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:${KOTLIN_VERSION}"
|
||||
|
||||
implementation 'com.squareup.moshi:moshi-kotlin:1.13.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
|
||||
|
||||
}
|
||||
|
28
processor/build.gradle
Normal file
28
processor/build.gradle
Normal file
|
@ -0,0 +1,28 @@
|
|||
apply plugin: "kotlin"
|
||||
apply plugin: "application"
|
||||
|
||||
mainClassName = "org.ethereum.lists.chains.MainKt"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:${KOTLIN_VERSION}"
|
||||
|
||||
implementation "com.github.komputing.kethereum:rpc:${KETHEREUM_VERSION}"
|
||||
implementation "com.github.komputing.kethereum:model:${KETHEREUM_VERSION}"
|
||||
implementation "com.github.komputing.kethereum:erc55:${KETHEREUM_VERSION}"
|
||||
implementation "com.github.komputing.kethereum:crypto_impl_bouncycastle:${KETHEREUM_VERSION}"
|
||||
|
||||
implementation 'com.beust:klaxon:5.5'
|
||||
implementation 'com.squareup.moshi:moshi-kotlin:1.13.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
|
||||
|
||||
implementation project(":model")
|
||||
|
||||
testImplementation "org.jetbrains.kotlin:kotlin-test:${KOTLIN_VERSION}"
|
||||
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:${KOTLIN_VERSION}"
|
||||
}
|
||||
|
|
@ -12,9 +12,11 @@ import org.kethereum.rpc.HttpEthereumRPC
|
|||
val parsedShortNames = mutableSetOf<String>()
|
||||
val parsedNames = mutableSetOf<String>()
|
||||
|
||||
val iconsPath = File("_data/icons")
|
||||
val basePath = File("..")
|
||||
val dataPath = File(basePath, "_data")
|
||||
val iconsPath = File(dataPath, "icons")
|
||||
|
||||
val chainsPath = File("_data/chains")
|
||||
val chainsPath = File(dataPath, "chains")
|
||||
private val allFiles = chainsPath.listFiles() ?: error("$chainsPath must contain the chain json files - but it does not")
|
||||
private val allChainFiles = allFiles.filter { !it.isDirectory }
|
||||
|
||||
|
@ -26,7 +28,7 @@ fun main(args: Array<String>) {
|
|||
}
|
||||
|
||||
private fun createOutputFiles() {
|
||||
val buildPath = File("output").apply { mkdir() }
|
||||
val buildPath = File(basePath, "output").apply { mkdir() }
|
||||
|
||||
val chainJSONArray = JsonArray<JsonObject>()
|
||||
val miniChainJSONArray = JsonArray<JsonObject>()
|
2
settings.gradle.kts
Normal file
2
settings.gradle.kts
Normal file
|
@ -0,0 +1,2 @@
|
|||
include(":model")
|
||||
include(":processor")
|
Loading…
Reference in New Issue
Block a user