Added circle ci

pull/17/head
florent champigny 8 years ago
parent d127349ce7
commit 8b8f298b81
  1. 2
      app/src/main/java/com/github/florent37/camerafragment/sample/MainActivity.java
  2. 2
      camerafragment/build.gradle
  3. 5
      circle.yml
  4. 19
      gradle/bintray-android-v1.gradle
  5. 17
      gradle/bintray-java-v1.gradle

@ -156,7 +156,7 @@ public class MainActivity extends AppCompatActivity {
cameraLayout.setVisibility(View.VISIBLE); cameraLayout.setVisibility(View.VISIBLE);
final CameraFragment cameraFragment = CameraFragment.newInstance(new Configuration.Builder() final CameraFragment cameraFragment = CameraFragment.newInstance(new Configuration.Builder()
.setCamera(Configuration.CAMERA_FACE_FRONT).build()); .setCamera(Configuration.CAMERA_FACE_REAR).build());
getSupportFragmentManager().beginTransaction() getSupportFragmentManager().beginTransaction()
.replace(R.id.content, cameraFragment, FRAGMENT_TAG) .replace(R.id.content, cameraFragment, FRAGMENT_TAG)
.commit(); .commit();

@ -48,7 +48,5 @@ ext {
allLicenses = ["Apache-2.0"] allLicenses = ["Apache-2.0"]
} }
if (project.rootProject.file('local.properties').exists()) {
apply from: rootProject.file('gradle/install-v1.gradle') apply from: rootProject.file('gradle/install-v1.gradle')
apply from: rootProject.file('gradle/bintray-android-v1.gradle') apply from: rootProject.file('gradle/bintray-android-v1.gradle')
}

@ -0,0 +1,5 @@
deployment:
release:
tag: /v.*/
commands:
- ./gradlew :camerafragment:bintrayUpload

@ -21,13 +21,24 @@ artifacts {
archives sourcesJar archives sourcesJar
} }
// Bintray def _user = System.getenv("BINTRAY_USER")
def _key = System.getenv("BINTRAY_API_KEY")
def _passphrase = System.getenv("BINTRAY_PASSPHRASE")
if(project.rootProject.file('local.properties').exists() && (_user == null || _user.isEmpty())){
Properties properties = new Properties() Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream()) properties.load(project.rootProject.file('local.properties').newDataInputStream())
_user = properties.getProperty("bintray.user")
_key = properties.getProperty("bintray.apikey");
_passphrase = properties.getProperty("bintray.gpg.password")
}
// Bintray
bintray { bintray {
user = properties.getProperty("bintray.user") user = _user
key = properties.getProperty("bintray.apikey") key = _key
configurations = ['archives'] configurations = ['archives']
pkg { pkg {
@ -44,7 +55,7 @@ bintray {
desc = libraryDescription desc = libraryDescription
gpg { gpg {
sign = true //Determines whether to GPG sign the files. The default is false sign = true //Determines whether to GPG sign the files. The default is false
passphrase = properties.getProperty("bintray.gpg.password") passphrase = _passphrase
//Optional. The passphrase for GPG signing' //Optional. The passphrase for GPG signing'
} }
} }

@ -17,12 +17,23 @@ artifacts {
} }
// Bintray // Bintray
def _user = System.getenv("BINTRAY_USER")
def _key = System.getenv("BINTRAY_API_KEY")
def _passphrase = System.getenv("BINTRAY_PASSPHRASE")
if(project.rootProject.file('local.properties').exists() && (_user == null || _user.isEmpty())){
Properties properties = new Properties() Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream()) properties.load(project.rootProject.file('local.properties').newDataInputStream())
_user = properties.getProperty("bintray.user")
_key = properties.getProperty("bintray.apikey");
_passphrase = properties.getProperty("bintray.gpg.password")
}
bintray { bintray {
user = properties.getProperty("bintray.user") user = _user
key = properties.getProperty("bintray.apikey") key = _key
configurations = ['archives'] configurations = ['archives']
pkg { pkg {
@ -39,7 +50,7 @@ bintray {
desc = libraryDescription desc = libraryDescription
gpg { gpg {
sign = true //Determines whether to GPG sign the files. The default is false sign = true //Determines whether to GPG sign the files. The default is false
passphrase = properties.getProperty("bintray.gpg.password") passphrase = _passphrase
//Optional. The passphrase for GPG signing' //Optional. The passphrase for GPG signing'
} }
} }

Loading…
Cancel
Save