This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export default class ClassBasedComponent extends React.Component { | |
constructor(props) { | |
super(props); | |
// do something useful | |
} | |
componentWillMount() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.json.JsonSlurper | |
def json = new JsonSlurper().parseText(""" | |
{ | |
inline: "json" | |
} | |
""") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def xml = new XmlSlurper().parseText(xmlText) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id "com.appspot.glide-gae" version "0.9.3" | |
id 'idea' | |
} | |
idea { | |
module { | |
sourceDirs += file('app') | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
buildTypes { | |
debug { | |
testCoverageEnabled = true | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.library' | |
android { | |
compileSdkVersion 22 | |
buildToolsVersion '23.0.2' | |
} | |
dependencies { | |
testCompile 'junit:junit:4.12' | |
testCompile 'org.mockito:mockito-core:1.10.19' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.foo" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk android:minSdkVersion="14" /> | |
<application/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'jacoco' | |
jacoco { | |
toolVersion = "0.7.7.201606060606" | |
reportsDir = file("$buildDir/coverage") | |
} | |
jacocoTestReport { | |
reports { | |
csv.enabled false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ** Mutation Testing ** | |
buildscript { | |
repositories { mavenCentral() } | |
dependencies { classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.1.9' } | |
} | |
apply plugin: "info.solidsoft.pitest" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In a function foo be careful when you have something like following: | |
// Doesn't Work - implicit return and no semicolon | |
const myStr = "hello-world".split('-').join('_') | |
`${myStr}/` | |
// Works | |
const myStr = "hello-world".split('-').join('_'); | |
return `${myStr}/`; |