This file contains 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
task uploadTf(dependsOn: assembleRelease) << { | |
def teamToken = '<TestFlight team token here>' | |
def apiToken = '<TestFlight api token here>' | |
def lists = '<TestFlight distribution lists here>' | |
def apk = file("build/apk/$project.name-release.apk") | |
def notes = new File(file('changelog.mdown')).getText("UTF-8") | |
def http = new HTTPBuilder('http://testflightapp.com') | |
println('Uploading build to TestFlight...') | |
http.request(POST, JSON) { req -> | |
uri.path = '/api/builds.json' |
This file contains 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 android.os.SystemClock; | |
import android.support.v4.util.LruCache; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* An Lru Cache that allows entries to expire after | |
* a period of time. Items are evicted based on a combination | |
* of time, and usage. Adding items past the {@code maxSize} |
This file contains 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
package com.segmentfault.app.view; | |
import android.content.Context; | |
import android.support.v4.view.MotionEventCompat; | |
import android.support.v4.view.NestedScrollingChild; | |
import android.support.v4.view.NestedScrollingChildHelper; | |
import android.support.v4.view.ViewCompat; | |
import android.support.v4.widget.SwipeRefreshLayout; | |
import android.util.AttributeSet; | |
import android.view.MotionEvent; |
This file contains 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 android.os.Environment; | |
import android.support.annotation.NonNull; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.concurrent.TimeUnit; |
This file contains 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> | |
<!-- Remove first, re-add with clone-depth of 1 --> | |
<remove-project path="cts" name="platform/cts" groups="cts,pdk-cw-fs,pdk-fs" /> | |
<remove-project path="dalvik" name="platform/dalvik" groups="pdk-cw-fs,pdk-fs" /> | |
<remove-project path="developers/build" name="platform/developers/build" /> | |
<remove-project path="developers/demos" name="platform/developers/demos" /> | |
<remove-project path="developers/samples/android" name="platform/developers/samples/android" /> | |
<remove-project path="development" name="platform/development" groups="pdk-cw-fs,pdk-fs" /> |
This file contains 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
package com.tuenti.nestedwebscrollview; | |
import android.content.Context; | |
import android.support.v4.view.MotionEventCompat; | |
import android.support.v4.view.NestedScrollingChild; | |
import android.support.v4.view.NestedScrollingChildHelper; | |
import android.support.v4.view.NestedScrollingParent; | |
import android.support.v4.view.VelocityTrackerCompat; | |
import android.support.v4.view.ViewCompat; | |
import android.support.v4.widget.ScrollerCompat; |
This file contains 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
// You can use maven-publish-helper.gradle script without changes and even share it between multiple | |
// modules. Just place the maven-publish-helper.gradle file in the root directory of your project, | |
// then apply it at the bottom of your module's build.gradle file like this: | |
// ...content of module's build.gradle file... | |
apply from: '../maven-publish-helper.gradle' | |
publishing { | |
publications { |
This file contains 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
#!/bin/sh | |
# cross & static compile shadowsocks-libev | |
PCRE_VER=8.41 | |
PCRE_FILE="http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VER.tar.gz" | |
MBEDTLS_VER=2.6.0 | |
MBEDTLS_FILE="https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz" |
This file contains 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 org.sonatype.nexus.common.entity.* | |
import org.sonatype.nexus.security.* | |
import org.sonatype.nexus.security.authz.* | |
import org.sonatype.nexus.selector.* | |
import com.google.common.collect.ImmutableMap | |
// use container.lookup to fetch internal APIs we need to use | |
def selectorManager = container.lookup(SelectorManager.class.name) | |
def securitySystem = container.lookup(SecuritySystem.class.name) |
OlderNewer