-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from zeoflow/initial-deploy
Files Created
- Loading branch information
Showing
227 changed files
with
20,583 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures | ||
/.idea | ||
|
||
*.iml | ||
anidero/anidero.gpg |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
set +e | ||
|
||
bootanim="" | ||
failcounter=0 | ||
timeout_in_sec=360 | ||
|
||
until [[ "$bootanim" =~ "stopped" ]]; do | ||
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1 &` | ||
if [[ "$bootanim" =~ "device not found" || "$bootanim" =~ "device offline" | ||
|| "$bootanim" =~ "running" ]]; then | ||
let "failcounter += 1" | ||
echo "Waiting for emulator to start" | ||
if [[ $failcounter -gt timeout_in_sec ]]; then | ||
echo "Timeout ($timeout_in_sec seconds) reached; failed to start emulator" | ||
exit 1 | ||
fi | ||
fi | ||
sleep 1 | ||
done | ||
|
||
echo "Emulator is ready" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
defaultConfig { | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode rootProject.ext.versionCode | ||
versionName rootProject.ext.versionName | ||
vectorDrawables.useSupportLibrary = true | ||
} | ||
lintOptions { | ||
abortOnError true | ||
textReport true | ||
textOutput 'stdout' | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_7 | ||
targetCompatibility JavaVersion.VERSION_1_7 | ||
} | ||
testOptions { | ||
unitTests { | ||
includeAndroidResources = true | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation androidx.appcompat | ||
implementation androidx.browser | ||
implementation androidx.cardview | ||
implementation androidx.constraintlayout | ||
implementation androidx.exifinterface | ||
implementation androidx.recyclerview | ||
implementation androidx.transition | ||
|
||
implementation 'com.squareup.okio:okio:2.6.0' | ||
annotationProcessor "com.uber.nullaway:nullaway:0.7.5" | ||
} | ||
|
||
apply from: "${rootProject.projectDir}/anidero/maven-push.gradle" | ||
repositories { | ||
mavenCentral() | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
POM_NAME=Anidero | ||
POM_ARTIFACT_ID=anidero | ||
POM_PACKAGING=aar | ||
|
||
VERSION_NAME=1.0.0 | ||
VERSION_CODE=1 | ||
GROUP=com.zeoflow | ||
|
||
POM_DESCRIPTION=An Android Library that renders After Effects animations in JSON format | ||
POM_URL=https://github.com/zeoflow/anidero | ||
POM_SCM_URL=https://github.com/zeoflow/anidero | ||
POM_SCM_CONNECTION=scm:git@github.com:zeoflow/anidero.git | ||
POM_SCM_DEV_CONNECTION=scm:git@github.com:zeoflow/anidero.git | ||
POM_LICENCE_NAME=The Apache Software License, Version 2.0 | ||
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt | ||
POM_LICENCE_DIST=repo | ||
POM_DEVELOPER_ID=zeoflow | ||
POM_DEVELOPER_NAME=ZeoFlow | ||
|
||
org.gradle.daemon=true | ||
|
||
NEXUS_USERNAME= | ||
NEXUS_PASSWORD= | ||
signing.keyId= | ||
signing.password= | ||
signing.secretKeyRingFile= |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
/* | ||
* Copyright 2020 ZeoFlow | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
def isReleaseBuild() { | ||
return VERSION_NAME.contains("SNAPSHOT") == false | ||
} | ||
|
||
def getReleaseRepositoryUrl() { | ||
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL | ||
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
} | ||
|
||
def getSnapshotRepositoryUrl() { | ||
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL | ||
: "https://oss.sonatype.org/content/repositories/snapshots/" | ||
} | ||
|
||
def getRepositoryUsername() { | ||
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "" | ||
} | ||
|
||
def getRepositoryPassword() { | ||
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "" | ||
} | ||
|
||
afterEvaluate { project -> | ||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
pom.groupId = GROUP | ||
pom.artifactId = POM_ARTIFACT_ID | ||
pom.version = VERSION_NAME | ||
|
||
repository(url: getReleaseRepositoryUrl()) { | ||
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) | ||
} | ||
snapshotRepository(url: getSnapshotRepositoryUrl()) { | ||
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) | ||
} | ||
|
||
pom.project { | ||
name POM_NAME | ||
packaging POM_PACKAGING | ||
description POM_DESCRIPTION | ||
url POM_URL | ||
|
||
scm { | ||
url POM_SCM_URL | ||
connection POM_SCM_CONNECTION | ||
developerConnection POM_SCM_DEV_CONNECTION | ||
} | ||
|
||
licenses { | ||
license { | ||
name POM_LICENCE_NAME | ||
url POM_LICENCE_URL | ||
distribution POM_LICENCE_DIST | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id POM_DEVELOPER_ID | ||
name POM_DEVELOPER_NAME | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") } | ||
sign configurations.archives | ||
} | ||
|
||
task androidSourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from android.sourceSets.main.java.sourceFiles | ||
} | ||
|
||
artifacts { | ||
archives androidSourcesJar | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<manifest package="com.zeoflow.anidero" > | ||
|
||
<application /> | ||
|
||
</manifest> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package com.zeoflow.anidero; | ||
|
||
import androidx.annotation.RestrictTo; | ||
import androidx.core.os.TraceCompat; | ||
|
||
@RestrictTo(RestrictTo.Scope.LIBRARY) | ||
public class Anidero | ||
{ | ||
|
||
public static boolean DBG = false; | ||
public static final String TAG = "ANIDERO"; | ||
|
||
private static final int MAX_DEPTH = 20; | ||
private static boolean traceEnabled = false; | ||
private static String[] sections; | ||
private static long[] startTimeNs; | ||
private static int traceDepth = 0; | ||
private static int depthPastMaxDepth = 0; | ||
|
||
public static void setTraceEnabled(boolean enabled) { | ||
if (traceEnabled == enabled) { | ||
return; | ||
} | ||
traceEnabled = enabled; | ||
if (traceEnabled) { | ||
sections = new String[MAX_DEPTH]; | ||
startTimeNs = new long[MAX_DEPTH]; | ||
} | ||
} | ||
|
||
public static void beginSection(String section) { | ||
if (!traceEnabled) { | ||
return; | ||
} | ||
if (traceDepth == MAX_DEPTH) { | ||
depthPastMaxDepth++; | ||
return; | ||
} | ||
sections[traceDepth] = section; | ||
startTimeNs[traceDepth] = System.nanoTime(); | ||
TraceCompat.beginSection(section); | ||
traceDepth++; | ||
} | ||
|
||
public static float endSection(String section) { | ||
if (depthPastMaxDepth > 0) { | ||
depthPastMaxDepth--; | ||
return 0; | ||
} | ||
if (!traceEnabled) { | ||
return 0; | ||
} | ||
traceDepth--; | ||
if (traceDepth == -1) { | ||
throw new IllegalStateException("Can't end trace section. There are none."); | ||
} | ||
if (!section.equals(sections[traceDepth])) { | ||
throw new IllegalStateException("Unbalanced trace call " + section + | ||
". Expected " + sections[traceDepth] + "."); | ||
} | ||
TraceCompat.endSection(); | ||
return (System.nanoTime() - startTimeNs[traceDepth]) / 1000000f; | ||
} | ||
} |
Oops, something went wrong.