From 1d551bc766da6da8bdc3e69892cbb610f2ecd44d Mon Sep 17 00:00:00 2001 From: vadym Date: Wed, 17 Jun 2020 00:43:59 -0700 Subject: [PATCH] 1. make native Yggdrasil lib build on-fly --- app/build.gradle | 25 +++++++++++++------ .../github/chronosx88/yggdrasil/Constants.kt | 3 --- build.gradle | 2 -- yggdrasil/build.gradle | 1 + 4 files changed, 18 insertions(+), 13 deletions(-) delete mode 100644 app/src/main/java/io/github/chronosx88/yggdrasil/Constants.kt diff --git a/app/build.gradle b/app/build.gradle index 3e72e09..930194a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,13 +8,12 @@ android { applicationId "io.github.chronosx88.yggdrasil" minSdkVersion 21 targetSdkVersion 29 - versionCode 1 - versionName "1.0" + versionCode 2 + versionName "1.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } signingConfigs { release { - storeFile file(KEYSTORE_FILE_PATH) storePassword System.getenv("KEYSTORE_PASSWORD") keyAlias System.getenv("KEY_ALIAS") @@ -31,17 +30,27 @@ android { ndkVersion "21.2.6472646" } +task ndkBuild(type: Exec) { + def rootDir = project.rootDir + workingDir = new File(rootDir,"yggdrasil") + commandLine 'make' +} + +gradle.projectsEvaluated { + tasks.compileDebugKotlin.dependsOn(ndkBuild) +} + dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(path: ':yggdrasil') - implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.0.2' + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0-RC2' - implementation 'com.google.android.material:material:1.1.0-alpha09' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7' + implementation 'com.google.android.material:material:1.3.0-alpha01' implementation 'org.hjson:hjson:3.0.0' implementation 'com.google.code.gson:gson:2.8.6' -} +} \ No newline at end of file diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/Constants.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/Constants.kt deleted file mode 100644 index 8374c06..0000000 --- a/app/src/main/java/io/github/chronosx88/yggdrasil/Constants.kt +++ /dev/null @@ -1,3 +0,0 @@ -package io.github.chronosx88.yggdrasil - -const val YGGDRASIL_VERSION = "0.3.8" \ No newline at end of file diff --git a/build.gradle b/build.gradle index 03ed29e..ec73f9e 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,6 @@ buildscript { repositories { google() jcenter() - } dependencies { classpath 'com.android.tools.build:gradle:4.0.0' @@ -19,7 +18,6 @@ allprojects { repositories { google() jcenter() - } } diff --git a/yggdrasil/build.gradle b/yggdrasil/build.gradle index 2785576..65b61b6 100644 --- a/yggdrasil/build.gradle +++ b/yggdrasil/build.gradle @@ -1,2 +1,3 @@ configurations.maybeCreate("default") + artifacts.add("default", file('yggdrasil.aar')) \ No newline at end of file