Skip to content

Commit

Permalink
Repositories.gradle (#675)
Browse files Browse the repository at this point in the history
* Enable extensible repositories for non-public dependencies
* If there are any issues with your local IDE, contact @adrw
* Restores code from #670 and #671 that was reverted in 9a7f0c4
  • Loading branch information
adrw committed Nov 29, 2018
1 parent 113ac08 commit b608790
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -19,3 +19,4 @@ lib
dist
.hash
hooks.gradle
repositories.gradle
28 changes: 27 additions & 1 deletion build.gradle
@@ -1,14 +1,29 @@
ext {
isCi = "true".equals(System.getenv('CI'))
isSqCi = "true".equals(System.getenv('SQCI'))
rep = null
}
apply from: file("./dependencies.gradle")

if (rootProject.file("repositories.gradle").exists()) {
apply from: rootProject.file("repositories.gradle")
}
apply from: new File("./dependencies.gradle")

subprojects {
buildscript {
repositories {
mavenCentral()
jcenter()
if (rep != null) {
if (rep.maven) {
for (Map.Entry<String, String> repEntry : rep.maven) {
println(repEntry.value)
maven {
url repEntry.value
}
}
}
}
}

dependencies {
Expand All @@ -21,5 +36,16 @@ subprojects {
repositories {
mavenCentral()
jcenter()
if (rep != null) {
if (rep.maven) {
for (Map.Entry<String, String> repEntry : rep.maven) {
println(repEntry.value)
maven {
url repEntry.value
}
}
}
}
}
}

2 changes: 1 addition & 1 deletion dependencies.gradle
Expand Up @@ -49,7 +49,7 @@ ext.dep = [
"logbackClassic": "ch.qos.logback:logback-classic:1.2.3",
"logbackJsonCore": "ch.qos.logback.contrib:logback-json-core:0.1.5",
"loggingApi": "io.github.microutils:kotlin-logging:1.4.9",
"miskWeb": "com.squareup.misk-web:misk-web:2018.11.24-8047665",
"miskWeb": "com.squareup.misk-web:misk-web:2018.11.26-295169d",
"mockitoCore": "org.mockito:mockito-core:2.8.9",
"moshi": "com.squareup.moshi:moshi-kotlin:1.5.0",
"mysql": "mysql:mysql-connector-java:5.1.16",
Expand Down
2 changes: 1 addition & 1 deletion misk/build.gradle
Expand Up @@ -88,7 +88,7 @@ dependencies {
testCompile project(':misk-testing')
}

if (rootProject.ext.isSqCi) {
if (rootProject.file("repositories.gradle").exists()) {
dependencies {
compile dep.miskWeb
}
Expand Down
15 changes: 0 additions & 15 deletions misk/src/main/kotlin/misk/web/metadata/AdminDashboardModule.kt
Expand Up @@ -81,21 +81,6 @@ class AdminDashboardModule(val environment: Environment) : KAbstractModule() {
web_proxy_url = "http://localhost:3201/"
))

// Example
multibind<DashboardTab, AdminDashboardTab>().toInstance(DashboardTab(
name = "Example",
slug = "example",
url_path_prefix = "/_admin/example/",
category = "Misk Development"
))
install(WebTabResourceModule(
environment = environment,
slug = "example",
web_proxy_url = "http://localhost:3199/"
))



// True for testing Misk Menu with populated tabs and categories, tabs are not functional
if (environment == Environment.DEVELOPMENT || environment == Environment.TESTING) {
multibind<DashboardTab, AdminDashboardTab>().toInstance(DashboardTab(
Expand Down

0 comments on commit b608790

Please sign in to comment.