Skip to content

Commit 9050e52

Browse files
committed
Initial commit
0 parents  commit 9050e52

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1118
-0
lines changed

.gitignore

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# [Android] ========================
2+
# Built application files
3+
*.apk
4+
*.ap_
5+
6+
# Files for the Dalvik VM
7+
*.dex
8+
9+
# Java class files
10+
*.class
11+
12+
# Generated files
13+
bin/
14+
gen/
15+
16+
# Gradle files
17+
.gradle/
18+
build/
19+
20+
# Local configuration file (sdk path, etc)
21+
local.properties
22+
23+
# Proguard folder generated by Eclipse
24+
proguard/
25+
26+
# Log Files
27+
*.log
28+
29+
30+
## Directory-based project format:
31+
.idea/
32+
33+
## File-based project format:
34+
*.ipr
35+
*.iws
36+
37+
## Plugin-specific files:
38+
39+
# IntelliJ
40+
out/
41+
42+
# mpeltonen/sbt-idea plugin
43+
.idea_modules/
44+
45+
# JIRA plugin
46+
atlassian-ide-plugin.xml
47+
48+
# Crashlytics plugin (for Android Studio and IntelliJ)
49+
com_crashlytics_export_strings.xml
50+
51+
52+
# [Maven] ========================
53+
target/
54+
pom.xml.tag
55+
pom.xml.releaseBackup
56+
pom.xml.versionsBackup
57+
pom.xml.next
58+
release.properties
59+
60+
61+
# [Gradle-Android] ========================
62+
63+
# Ignore Gradle GUI config
64+
gradle-app.setting
65+
66+
# Gradle Signing
67+
signing.properties
68+
trestle.keystore
69+
70+
# Mobile Tools for Java (J2ME)
71+
.mtj.tmp/
72+
73+
# Package Files #
74+
*.jar
75+
*.war
76+
*.ear
77+
78+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
79+
hs_err_pid*
80+
81+
# Misc
82+
/.idea/workspace.xml
83+
.DS_Store
84+
/captures
85+
**/*.iml
86+
*.class

build.gradle

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
3+
buildscript {
4+
5+
repositories {
6+
google()
7+
jcenter()
8+
}
9+
dependencies {
10+
classpath 'com.android.tools.build:gradle:3.1.3'
11+
12+
13+
// NOTE: Do not place your application dependencies here; they belong
14+
// in the individual module build.gradle files
15+
}
16+
}
17+
18+
allprojects {
19+
repositories {
20+
google()
21+
jcenter()
22+
}
23+
}
24+
25+
task clean(type: Delete) {
26+
delete rootProject.buildDir
27+
}

cutabletextview/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

cutabletextview/build.gradle

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apply plugin: 'com.android.library'
2+
apply from: 'maven-push.gradle'
3+
4+
android {
5+
compileSdkVersion 28
6+
7+
8+
9+
defaultConfig {
10+
minSdkVersion 19
11+
targetSdkVersion 28
12+
versionCode 1
13+
versionName "1.0"
14+
15+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16+
17+
}
18+
19+
buildTypes {
20+
release {
21+
minifyEnabled false
22+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
23+
}
24+
}
25+
26+
compileOptions {
27+
targetCompatibility 1.8
28+
sourceCompatibility 1.8
29+
}
30+
}
31+
32+
dependencies {
33+
implementation fileTree(dir: 'libs', include: ['*.jar'])
34+
35+
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
36+
testImplementation 'junit:junit:4.12'
37+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
38+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
39+
}

cutabletextview/gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
POM_NAME=CutableTextView
2+
POM_ARTIFACT_ID=cutabletextview
3+
POM_PACKAGING=aar

cutabletextview/maven-push.gradle

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/*
2+
* Copyright 2013 Chris Banes
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
apply plugin: 'maven'
18+
apply plugin: 'signing'
19+
20+
def isReleaseBuild() {
21+
return VERSION_NAME.contains("SNAPSHOT") == false
22+
}
23+
24+
def getReleaseRepositoryUrl() {
25+
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
26+
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
27+
}
28+
29+
def getSnapshotRepositoryUrl() {
30+
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
31+
: "https://oss.sonatype.org/content/repositories/snapshots/"
32+
}
33+
34+
def getRepositoryUsername() {
35+
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
36+
}
37+
38+
def getRepositoryPassword() {
39+
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
40+
}
41+
42+
afterEvaluate { project ->
43+
uploadArchives {
44+
repositories {
45+
mavenDeployer {
46+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
47+
48+
pom.groupId = GROUP
49+
pom.artifactId = POM_ARTIFACT_ID
50+
pom.version = VERSION_NAME
51+
52+
repository(url: getReleaseRepositoryUrl()) {
53+
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
54+
}
55+
snapshotRepository(url: getSnapshotRepositoryUrl()) {
56+
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
57+
}
58+
59+
pom.project {
60+
name POM_NAME
61+
packaging POM_PACKAGING
62+
description POM_DESCRIPTION
63+
url POM_URL
64+
65+
scm {
66+
url POM_SCM_URL
67+
connection POM_SCM_CONNECTION
68+
developerConnection POM_SCM_DEV_CONNECTION
69+
}
70+
71+
licenses {
72+
license {
73+
name POM_LICENCE_NAME
74+
url POM_LICENCE_URL
75+
distribution POM_LICENCE_DIST
76+
}
77+
}
78+
79+
developers {
80+
developer {
81+
id POM_DEVELOPER_ID
82+
name POM_DEVELOPER_NAME
83+
}
84+
}
85+
}
86+
}
87+
}
88+
}
89+
90+
signing {
91+
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
92+
sign configurations.archives
93+
}
94+
95+
//task androidJavadocs(type: Javadoc) {
96+
//source = android.sourceSets.main.allJava
97+
//}
98+
99+
//task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
100+
//classifier = 'javadoc'
101+
//from androidJavadocs.destinationDir
102+
//}
103+
104+
task androidSourcesJar(type: Jar) {
105+
classifier = 'sources'
106+
from android.sourceSets.main.java.sourceFiles
107+
}
108+
109+
artifacts {
110+
archives androidSourcesJar
111+
}
112+
}

cutabletextview/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.david.cutabletextview;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumented test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("com.david.cutabletextview.test", appContext.getPackageName());
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.david.cutabletextview" />

0 commit comments

Comments
 (0)