Skip to content

Commit

Permalink
Split out the model to extra module
Browse files Browse the repository at this point in the history
  • Loading branch information
ligi committed Dec 30, 2021
1 parent 4aa4314 commit dfba60a
Show file tree
Hide file tree
Showing 43 changed files with 51 additions and 30 deletions.
28 changes: 1 addition & 27 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}

apply plugin: "com.github.ben-manes.versions"
15 changes: 15 additions & 0 deletions model/build.gradle
Original file line number Diff line number Diff line change
@@ -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 changes: 28 additions & 0 deletions processor/build.gradle
Original file line number Diff line number Diff line change
@@ -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}"
}

Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand All @@ -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>()
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include(":model")
include(":processor")

0 comments on commit dfba60a

Please sign in to comment.