Skip to content

Commit

Permalink
Changes made in gradel files to download and unzip xwiki local instan…
Browse files Browse the repository at this point in the history
…ce files.
  • Loading branch information
jaindiv26 committed Jun 21, 2019
1 parent 7583081 commit b1b22af
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/build
.idea/
*.iml
/app/libs
20 changes: 20 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ android {
dataBinding {
enabled = true
}
configurations {
zipped
}
useLibrary 'android.test.runner'
useLibrary 'android.test.base'
useLibrary 'android.test.mock'
Expand All @@ -51,6 +54,9 @@ dependencies {
implementation 'io.reactivex:rxandroid:1.1.0'
implementation 'io.reactivex:rxjava:1.3.0'

implementation files({ tasks.installDependencies.extractedJars })
zipped group: 'org.xwiki.platform', name: 'xwiki-platform-distribution-flavor-jetty-hsqldb', version: '10.11.8', ext: 'zip'

// For Local Unit Tests

// Required -- JUnit 4 framework
Expand Down Expand Up @@ -94,3 +100,17 @@ dependencies {

//androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v23:2.1.1'
}
task installDependencies(type: Sync) {
def extractDir = "${buildDir}/xwikiLocalInstanceDependency"

ext.extractedJars = fileTree(extractDir) {
include "**/*.jar"
builtBy "installDependencies"
}

dependsOn configurations.zipped
from {
configurations.zipped.collect { zipTree(it) }
}
into extractDir
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package org.xwiki.android.authdemo;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
public class ApplicationTest {

}
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ allprojects {
url "https://jitpack.io"
name "Jitpack"
}
maven {
url "https://maven.xwiki.org/releases/"
name "XWiki Releases"
}
google()
}
}

0 comments on commit b1b22af

Please sign in to comment.