Split out the model to extra module

This commit is contained in:
ligi 2021-12-30 07:34:57 +01:00
parent 4aa4314d51
commit dfba60a7b8
No known key found for this signature in database
GPG Key ID: 8E81894010ABF23D
43 changed files with 51 additions and 30 deletions

View File

@ -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
View 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
View 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}"
}

View File

@ -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
View File

@ -0,0 +1,2 @@
include(":model")
include(":processor")