Skip to content

Instantly share code, notes, and snippets.

class KotlinClass {
// here foo is declared as not nullable (nullable declaration would have been fun makeItCrash(foo: String?)
fun makeItCrash(foo: String) {
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.foo.etc.explorer"
minSdkVersion 19
targetSdkVersion 25
machine:
java:
version: oraclejdk8
environment:
ANDROID_HOME: /home/ubuntu/android
checkout:
post:
- git submodule sync
- git submodule init
- git submodule update
private void initOneSignal() {
OneSignal.startInit(this)
.setNotificationOpenedHandler(new NotificationsHandler())
.init();
OneSignal.idsAvailable(new OneSignal.IdsAvailableHandler() {
@Override
public void idsAvailable(String userId, String registrationId) {
Log.d("", "");
@agonist
agonist / ActivityComponent.java
Last active November 18, 2015 08:47
Dagger2 implem
@Singleton
@Component(modules = {ActivityModule.class, FragmentModule.class})
public interface ActivityComponent {
void inject(MyActivity activity);
}
@Target({TYPE, FIELD, ANNOTATION_TYPE, METHOD})
@Retention(RUNTIME)
@Constraint(validatedBy = CheckPasswordValidator.class)
@Documented
public @interface CheckPassword {
String message() default "";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
{
"name": "cloud-repository-dev",
"workspaces": {
"predefined": ["otherWorkspace"],
"default": "default",
"allowCreation": true,
"initialContent": {
"otherWorkspace": "conf/initialContent/init.xml"
}
},
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>model</artifactId>
<groupId>com.dooapp</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
public class Bar {
private String somefield;
private String someotherfield;
public String getSomeotherfield() {
return someotherfield;
}
public void setSomeotherfield(String someotherfield) {
public class AuthentificationIT extends WisdomTest {
@Inject
AuthentificationController authentificationController;
@Test
public void testLogin() {
assertThat(200).isEqualTo(200);
}
}