Skip to content

Commit

Permalink
Fix-build-on-Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Tornaco committed Oct 10, 2021
1 parent 199cbf3 commit 57787a4
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import org.jetbrains.kotlin.daemon.common.toHexString
import tornaco.project.android.thanox.Configs
import tornaco.project.android.thanox.Configs.magiskModuleBuildDir
import tornaco.project.android.thanox.Configs.ndkVersion
import tornaco.project.android.thanox.Configs.outDir
import tornaco.project.android.thanox.MagiskModConfigs
import tornaco.project.android.thanox.MagiskModConfigs.magiskModuleId
Expand Down Expand Up @@ -69,6 +70,7 @@ android {
dataBinding = false
prefab = true
}
ndkVersion = Configs.ndkVersion
}

repositories {
Expand Down Expand Up @@ -157,7 +159,7 @@ afterEvaluate {

val nativeOutDir = file("$buildDir/intermediates/cmake/${variant.name}/obj")
log("nativeOutDir: $nativeOutDir")
log("nativeOutDir: ${nativeOutDir.list()?.map { it }}")
log("nativeOutDir list: ${nativeOutDir.list()?.map { it }}")

doLast {
copy {
Expand Down
8 changes: 1 addition & 7 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@ buildscript {
google()
mavenCentral()
mavenLocal()
jcenter()
maven(url = "https://jitpack.io")
maven(url = "https://oss.sonatype.org/content/repositories/snapshots")
}

dependencies {
classpath(tornaco.project.android.thanox.ClassPaths.gradlePlugin)
classpath(tornaco.project.android.thanox.ClassPaths.kotlinPlugin)
classpath(tornaco.project.android.thanox.Libs.Hilt.gradlePlugin)
classpath(tornaco.project.android.thanox.Libs.ThanoxInternal.rhinoGradlePlugin)
classpath(tornaco.project.android.thanox.Libs.ThanoxInternal.nitroGradlePlugin)
}
}
Expand Down Expand Up @@ -48,13 +44,11 @@ log("thanoxVersionCode: $thanoxVersionCode")
log("thanoxVersionName: $thanoxVersionName")

subprojects {
log("subprojects: ${this.name}")
repositories {
google()
mavenCentral()
mavenLocal()
jcenter()
maven(url = "https://jitpack.io")
maven(url = "https://oss.sonatype.org/content/repositories/snapshots")
}

apply(plugin = "com.diffplug.spotless")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ object Configs {
const val minSdkVersion = 26
const val targetSdkVersion = 31
const val buildToolsVersion = "31.0.0-rc5"
const val ndkVersion = "21.1.6352462"
const val testRunner = "androidx.test.runner.AndroidJUnitRunner"

var thanoxVersionCode: Int? = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,15 @@ object Libs {
object ThanoxInternal {
const val version = "1.0.0-SNAPSHOT"

private const val groupRhino = "github.tornaco.android.thanos.rhino-verify"
const val groupRhino = "github.tornaco.android.thanos.rhino-verify"
const val artifactRhinoAnnotations = "rhino_annotations"

const val groupNitro = "github.tornaco.android.thanos.nitro"
const val artifactNitro = "nitro_gradle_plugin"

const val rhinoAnnotations = "$groupRhino:rhino_annotations:$version"
const val rhinoAnnotations = "$groupRhino:$artifactRhinoAnnotations:$version"
const val rhinoGradlePlugin = "$groupRhino:rhino_plugin_stub_gen:$version"

const val nitroGradlePlugin = "$groupNitro:$artifactNitro:$version"
}
}
2 changes: 1 addition & 1 deletion android/internal/Thanox-Internal
17 changes: 16 additions & 1 deletion android/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
@file:Suppress("UnstableApiUsage")

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
google()
mavenCentral()
mavenLocal()
jcenter()
maven(url = "https://jitpack.io")
maven(url = "https://oss.sonatype.org/content/repositories/snapshots")
}
}


rootProject.name = "Thanox"

include(":app")
Expand Down Expand Up @@ -74,5 +89,5 @@ internalProjects.forEach {
println("internalProject: $it")
include(it)
project(it).projectDir =
file("internal/Thanox-Internal${it.replace(File.pathSeparator, File.separator)}")
file("internal/Thanox-Internal${it.replace(":", File.separator)}")
}

0 comments on commit 57787a4

Please sign in to comment.