- BitriseのRolling Buildsの挙動をまとめる
- また並列ビルドを行った際の挙動もちょっと触れる
- 同一ブランチに対するpushがあった場合に前回のビルドをキャンセルする機構
- Bitriseはこのステップで自身の公開APIを叩いて、新しいビルドをキックしている
import org.gradle.api.Plugin | |
import org.gradle.api.Project | |
import org.gradle.api.tasks.Exec | |
import org.gradle.kotlin.dsl.create | |
import org.gradle.kotlin.dsl.get | |
import java.util.Locale | |
private const val EXTENSION_NAME = "mainframer" | |
private const val DEFAULT_SCRIPT_NAME = "mainframer" |
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: "com.google.protobuf" | |
android { | |
compileSdkVersion 28 |
/** | |
* Created by Ryo on 2018/03/06. | |
*/ | |
public abstract class SwipeToDeleteCallback extends ItemTouchHelper.SimpleCallback { | |
private ColorDrawable mBackgroundColorDrawable = new ColorDrawable(); | |
private Drawable mSwipeBackIcon; | |
public SwipeToDeleteCallback(@NonNull Drawable swipeIcon, @ColorInt int swipeBackgroundColor) { |
/** | |
* Copyright (c) 2013 Xcellent Creations, Inc. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
#!/usr/bin/env ruby | |
app_version = '' | |
file_names = [] | |
changelog_contens_ja = [] | |
changelog_contens_en = [] | |
gradle_path = '../app/build.gradle' | |
# These files are base change log. | |
changelog_path_ja = '../change_log_ja.txt' |
Resources resources = getResources(); | |
Configuration configuration = resources.getConfiguration(); | |
configuration.setLocale(Locale.ENGLISH); // ここで取得したいLocaleを指定します。 | |
resources.updateConfiguration(configuration, null); // updateConfigurationを忘れずに… | |
// ここ以降で取得したstringはEngrishとなります。 | |
// 取得したstringでなにかする。setText()とか… | |
configuration.setLocale(Locale.getDefault()); // 設定を元に戻すのを忘れないように。 |
@RunWith(RobolectricGradleTestRunner.class) | |
@Config(constants = BuildConfig.class, sdk = 21, packageName = "com.wakwak.leakcanarytest") | |
public class ExampleUnitTest { | |
@Test | |
public void addition_isCorrect() throws Exception { | |
assertEquals(4, 2 + 2); | |
} | |
} |
public class MainActivity extends AppCompatActivity { | |
@Bind(R.id.root) | |
LinearLayout root; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
ButterKnife.bind(this); |