Skip to content

Commit

Permalink
final commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivangi2909 committed Jan 17, 2019
1 parent 47abe6e commit 500ed04
Show file tree
Hide file tree
Showing 52 changed files with 3,302 additions and 220 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ buildscript {
repositories {
google()
jcenter()
maven {
url "$buildDir/repo"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' // Add this line
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -21,6 +23,3 @@ allprojects {
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
85 changes: 84 additions & 1 deletion surveylib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'
group='com.github.ShivangiAgrawal'

android {
Expand All @@ -17,6 +17,84 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

lintOptions {
abortOnError false
}
}

/*publishing {
publications {
maven(MavenPublication) {
groupId //You can either define these here or get them from project conf elsewhere
artifactId 'demosurvey'
version '1.1.2'
artifact "$buildDir/outputs/aar/surveylib-debug.aar" //aar artifact you want to publish
//generate pom nodes for dependencies
pom.withXml {'com.demo'
def dependenciesNode = asNode().appendNode('dependencies')
configurations.compile.allDependencies.each { dependency ->
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', dependency.group)
dependencyNode.appendNode('artifactId', dependency.name)
dependencyNode.appendNode('version', dependency.version)
}
}
}
}
}*/

publishing {
publications {
// Create different publications for every build types (debug and release)
android.buildTypes.all { variant ->
// Dynamically creating publications name
"${variant.name}Aar"(MavenPublication) {

def manifest = new XmlSlurper().parse(project.android.sourceSets.main.manifest.srcFile);
def libVersion = '1.1.3'
def artifactName = 'demosurvey'

// Artifact properties
groupId 'com.demo'
version = libVersion
artifactId variant.name == 'debug' ? artifactName + '-dev' : artifactName

// Tell maven to prepare the generated "*.aar" file for publishing
artifact("$buildDir/outputs/aar/${project.getName()}-${variant.name}.aar")

pom.withXml {
//Creating additional node for dependencies
def dependenciesNode = asNode().appendNode('dependencies')

//Defining configuration names from which dependencies will be taken (debugCompile or releaseCompile and compile)
def configurationNames = ["${variant.name}Implementation", 'implementation']

configurationNames.each { configurationName ->
configurations[configurationName].allDependencies.each {
if (it.group != null && it.name != null) {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)

//If there are any exclusions in dependency
if (it.excludeRules.size() > 0) {
def exclusionsNode = dependencyNode.appendNode('exclusions')
it.excludeRules.each { rule ->
def exclusionNode = exclusionsNode.appendNode('exclusion')
exclusionNode.appendNode('groupId', rule.group)
exclusionNode.appendNode('artifactId', rule.module)
}
}
}
}
}
}
}
}
}
}

dependencies {
Expand All @@ -30,4 +108,9 @@ dependencies {
// implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.mostafagazar:customshapeimageview:1.0.4'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.novoda:bintray-release:0.2.7'
implementation 'com.squareup.picasso:picasso:2.5.2'
//Volley - Network library
implementation 'com.mcxiaoke.volley:library:1.0.19'
}

6 changes: 1 addition & 5 deletions surveylib/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="demo.com.demosurvey">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
Expand All @@ -15,11 +16,6 @@
android:name=".NativeSurveyActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

Expand Down
106 changes: 48 additions & 58 deletions surveylib/src/main/assets/survey_question13_agree.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,22 @@
"orientation": "vertical",
"options": [
{
"label":"Agree",
"type":"TEXT_VIEW",
"uiType":"RECTANGLE_SINGLE_SELECTION",
"orientation":"horizontal"
"label": "Agree",
"type": "TEXT_VIEW",
"uiType": "RECTANGLE_SINGLE_SELECTION",
"orientation": "horizontal"
},
{
"label":"Disagree",
"type":"TEXT_VIEW",
"uiType":"RECTANGLE_SINGLE_SELECTION",
"orientation":"horizontal"

"label": "Disagree",
"type": "TEXT_VIEW",
"uiType": "RECTANGLE_SINGLE_SELECTION",
"orientation": "horizontal"
},
{
"label":"Don't Know",
"type":"TEXT_VIEW",
"uiType":"RECTANGLE_SINGLE_SELECTION",
"orientation":"horizontal"
"label": "Don't Know",
"type": "TEXT_VIEW",
"uiType": "RECTANGLE_SINGLE_SELECTION",
"orientation": "horizontal"
}
]
},
Expand All @@ -47,25 +46,22 @@
"orientation": "vertical",
"options": [
{
"label":"Agree",
"type":"TEXT_VIEW",
"uiType":"RECTANGLE_SINGLE_SELECTION",
"orientation":"horizontal"

"label": "Agree",
"type": "TEXT_VIEW",
"uiType": "RECTANGLE_SINGLE_SELECTION",
"orientation": "horizontal"
},
{
"label":"Disagree",
"type":"TEXT_VIEW",
"uiType":"RECTANGLE_SINGLE_SELECTION",
"orientation":"horizontal"

"label": "Disagree",
"type": "TEXT_VIEW",
"uiType": "RECTANGLE_SINGLE_SELECTION",
"orientation": "horizontal"
},
{
"label":"Don't Know",
"type":"TEXT_VIEW",
"uiType":"RECTANGLE_SINGLE_SELECTION",
"orientation":"horizontal"

"label": "Don't Know",
"type": "TEXT_VIEW",
"uiType": "RECTANGLE_SINGLE_SELECTION",
"orientation": "horizontal"
}
]
},
Expand All @@ -77,25 +73,22 @@
"orientation": "vertical",
"options": [
{
"label":"Agree",
"type":"TEXT_VIEW",
"uiType":"RECTANGLE_SINGLE_SELECTION",
"orientation":"horizontal"

"label": "Agree",
"type": "TEXT_VIEW",
"uiType": "RECTANGLE_SINGLE_SELECTION",
"orientation": "horizontal"
},
{
"label":"Disagree",
"type":"TEXT_VIEW",
"uiType":"RECTANGLE_SINGLE_SELECTION",
"orientation":"horizontal"

"label": "Disagree",
"type": "TEXT_VIEW",
"uiType": "RECTANGLE_SINGLE_SELECTION",
"orientation": "horizontal"
},
{
"label":"Don't Know",
"type":"TEXT_VIEW",
"uiType":"RECTANGLE_SINGLE_SELECTION",
"orientation":"horizontal"

"label": "Don't Know",
"type": "TEXT_VIEW",
"uiType": "RECTANGLE_SINGLE_SELECTION",
"orientation": "horizontal"
}
]
},
Expand All @@ -107,25 +100,22 @@
"orientation": "vertical",
"options": [
{
"label":"Agree",
"type":"TEXT_VIEW",
"uiType":"RECTANGLE_SINGLE_SELECTION",
"orientation":"horizontal"

"label": "Agree",
"type": "TEXT_VIEW",
"uiType": "RECTANGLE_SINGLE_SELECTION",
"orientation": "horizontal"
},
{
"label":"Disagree",
"type":"TEXT_VIEW",
"uiType":"RECTANGLE_SINGLE_SELECTION",
"orientation":"horizontal"

"label": "Disagree",
"type": "TEXT_VIEW",
"uiType": "RECTANGLE_SINGLE_SELECTION",
"orientation": "horizontal"
},
{
"label":"Don't Know",
"type":"TEXT_VIEW",
"uiType":"RECTANGLE_SINGLE_SELECTION",
"orientation":"horizontal"

"label": "Don't Know",
"type": "TEXT_VIEW",
"uiType": "RECTANGLE_SINGLE_SELECTION",
"orientation": "horizontal"
}
]
}
Expand Down
24 changes: 18 additions & 6 deletions surveylib/src/main/assets/survey_question26_circular_slider.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,49 @@
"orientation": "vertical",
"options": [
{
"label": "",
"label": "Press and rotate circle to your rating",
"type": "",
"uiType": "CIRCULAR_SLIDER",
"orientation": "vertical"
},
{
"label": "",
"label": "Not at all",
"type": "",
"uiType": "CIRCULAR_SLIDER",
"orientation": "vertical"
},
{
"label": "",
"label": "2",
"type": "",
"uiType": "CIRCULAR_SLIDER",
"orientation": "vertical"
},
{
"label": "",
"label": "3",
"type": "",
"uiType": "CIRCULAR_SLIDER",
"orientation": "vertical"
},
{
"label": "",
"label": "A little",
"type": "",
"uiType": "CIRCULAR_SLIDER",
"orientation": "vertical"
},
{
"label": "",
"label": "5",
"type": "",
"uiType": "CIRCULAR_SLIDER",
"orientation": "vertical"
},
{
"label": "6",
"type": "",
"uiType": "CIRCULAR_SLIDER",
"orientation": "vertical"
},
{
"label": "Totally",
"type": "",
"uiType": "CIRCULAR_SLIDER",
"orientation": "vertical"
Expand Down
Loading

0 comments on commit 500ed04

Please sign in to comment.