android
This commit is contained in:
parent
67a5cd7df0
commit
719762ac01
1
DEV4.1/test/cinema2/cinema
Submodule
1
DEV4.1/test/cinema2/cinema
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit a266118297ca4a1243b3748cde59de8ce282f51c
|
@ -1,94 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<script>
|
|
||||||
key = "92f0f56afffd55f39d43937ed6899e00";
|
|
||||||
let URL = "https://api.themoviedb.org/3/";
|
|
||||||
|
|
||||||
|
|
||||||
function research(input,page_index) {
|
|
||||||
return fetch(URL + "search/multi?query="+ input +"&api_key=" + key + "&page=" + page_index + "&language=fr")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => data);
|
|
||||||
console.log(response.json)
|
|
||||||
}
|
|
||||||
|
|
||||||
//Movie
|
|
||||||
|
|
||||||
function popMovie(page_index) {
|
|
||||||
return fetch(URL + "movie/popular?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => data);
|
|
||||||
console.log(response.json)
|
|
||||||
}
|
|
||||||
|
|
||||||
function trendMovie(page_index) {
|
|
||||||
return fetch(URL + "trending/movie/day?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => data);
|
|
||||||
console.log(response.json)
|
|
||||||
}
|
|
||||||
|
|
||||||
function topMovie(page_index) {
|
|
||||||
return fetch(URL + "movie/top_rated?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => data);
|
|
||||||
console.log(response.json)
|
|
||||||
}
|
|
||||||
|
|
||||||
function upcomingMovie(page_index) { // NIQUE TA RACE
|
|
||||||
return fetch(URL + "movie/upcoming?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => data);
|
|
||||||
console.log(response.json)
|
|
||||||
}
|
|
||||||
|
|
||||||
//TV
|
|
||||||
|
|
||||||
function popTV(page_index) {
|
|
||||||
return fetch(URL + "tv/popular?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => data);
|
|
||||||
console.log(response.json)
|
|
||||||
}
|
|
||||||
|
|
||||||
function todayTV(page_index) {
|
|
||||||
return fetch(URL + "tv/airing_today?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => data);
|
|
||||||
console.log(response.json)
|
|
||||||
}
|
|
||||||
|
|
||||||
function todayTV(page_index) {
|
|
||||||
return fetch(URL + "tv/on_the_air?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => data);
|
|
||||||
console.log(response.json)
|
|
||||||
}
|
|
||||||
|
|
||||||
function topTV(page_index) {
|
|
||||||
return fetch(URL + "tv/top_rated?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => data);
|
|
||||||
console.log(response.json)
|
|
||||||
}
|
|
||||||
|
|
||||||
//People
|
|
||||||
|
|
||||||
function findPeopleID(id) {
|
|
||||||
return fetch(URL + "person/"+ id +"?&api_key=" + key + "&language=fr")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => data);
|
|
||||||
console.log(response.json)
|
|
||||||
}
|
|
||||||
|
|
||||||
function findPeopleName(name,page_index) {
|
|
||||||
return fetch(URL + "search/person?query="+ name +"?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => data);
|
|
||||||
console.log(response.json)
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
</html>
|
|
139
DEV4.1/test/test/test.js
Normal file
139
DEV4.1/test/test/test.js
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
function apiManager() {
|
||||||
|
key = "92f0f56afffd55f39d43937ed6899e00";
|
||||||
|
let URL = "https://api.themoviedb.org/3/";
|
||||||
|
|
||||||
|
let request = { search, searchMovie, searchTV, searchPerson, popMovie, trendMovie, topMovie, upcomingMovie,
|
||||||
|
getMovieCredits, popTV, todayTV, weekTV, topTV, findPeopleID, findPeopleID, findPeopleName,
|
||||||
|
getPeopleCreditsTV, getPeopleCreditsMovie
|
||||||
|
};
|
||||||
|
|
||||||
|
function search(input,page_index) { //multisearch
|
||||||
|
return fetch(URL + "search/multi?query="+ input +"&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchMovie(input,page_index) {
|
||||||
|
return fetch(URL + "search/movie?query="+ input +"&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchTV(input,page_index) {
|
||||||
|
return fetch(URL + "search/tv?query="+ input +"&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchPerson(input,page_index) {
|
||||||
|
return fetch(URL + "search/person?query="+ input +"&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
//Movie
|
||||||
|
|
||||||
|
function popMovie(page_index) {
|
||||||
|
return fetch(URL + "movie/popular?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function trendMovie(page_index) {
|
||||||
|
return fetch(URL + "trending/movie/day?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function topMovie(page_index) {
|
||||||
|
return fetch(URL + "movie/top_rated?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function upcomingMovie(page_index) {
|
||||||
|
return fetch(URL + "movie/upcoming?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function getMovieCredits(id) {
|
||||||
|
return fetch(URL + "movie/" + id + "/credits?&api_key=" + key + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
//TV
|
||||||
|
|
||||||
|
function popTV(page_index) {
|
||||||
|
return fetch(URL + "tv/popular?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function todayTV(page_index) {
|
||||||
|
return fetch(URL + "tv/airing_today?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function weekTV(page_index) {
|
||||||
|
return fetch(URL + "tv/on_the_air?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function topTV(page_index) {
|
||||||
|
return fetch(URL + "tv/top_rated?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
//People
|
||||||
|
|
||||||
|
function findPeopleID(id) {
|
||||||
|
return fetch(URL + "person/"+ id +"?&api_key=" + key + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function findPeopleName(name,page_index) {
|
||||||
|
return fetch(URL + "search/person?query="+ name +"?&api_key=" + key + "&page=" + page_index + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPeopleCreditsTV(id) {
|
||||||
|
return fetch(URL + "person/"+ id + "/tv_credits?&api_key=" + key + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPeopleCreditsMovie(id) {
|
||||||
|
return fetch(URL + "person/"+ id + "/movie_credits?&api_key=" + key + "&language=fr")
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => data);
|
||||||
|
console.log(response.json)
|
||||||
|
}
|
||||||
|
|
||||||
|
// TAGGED IMAGES ??
|
||||||
|
|
||||||
|
return request;
|
||||||
|
|
||||||
|
}
|
1
DEV4.5/Android
Submodule
1
DEV4.5/Android
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit e2ecdea9e3aa6e130ca3a4ecd86058488e4dcd38
|
@ -1,4 +1,3 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||||
|
8
DEV4.5/Couleurs/.gitignore
vendored
Normal file
8
DEV4.5/Couleurs/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
*.iml
|
||||||
|
.gradle
|
||||||
|
/local.properties
|
||||||
|
/.idea/workspace.xml
|
||||||
|
/.idea/libraries
|
||||||
|
.DS_Store
|
||||||
|
/build
|
||||||
|
/captures
|
3
DEV4.5/Couleurs/.idea/.gitignore
vendored
Normal file
3
DEV4.5/Couleurs/.idea/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
BIN
DEV4.5/Couleurs/.idea/caches/build_file_checksums.ser
Normal file
BIN
DEV4.5/Couleurs/.idea/caches/build_file_checksums.ser
Normal file
Binary file not shown.
29
DEV4.5/Couleurs/.idea/codeStyles/Project.xml
Normal file
29
DEV4.5/Couleurs/.idea/codeStyles/Project.xml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<code_scheme name="Project" version="173">
|
||||||
|
<Objective-C-extensions>
|
||||||
|
<file>
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
|
||||||
|
</file>
|
||||||
|
<class>
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
|
||||||
|
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
|
||||||
|
</class>
|
||||||
|
<extensions>
|
||||||
|
<pair source="cpp" header="h" fileNamingConvention="NONE" />
|
||||||
|
<pair source="c" header="h" fileNamingConvention="NONE" />
|
||||||
|
</extensions>
|
||||||
|
</Objective-C-extensions>
|
||||||
|
</code_scheme>
|
||||||
|
</component>
|
16
DEV4.5/Couleurs/.idea/compiler.xml
Normal file
16
DEV4.5/Couleurs/.idea/compiler.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<wildcardResourcePatterns>
|
||||||
|
<entry name="!?*.java" />
|
||||||
|
<entry name="!?*.form" />
|
||||||
|
<entry name="!?*.class" />
|
||||||
|
<entry name="!?*.groovy" />
|
||||||
|
<entry name="!?*.scala" />
|
||||||
|
<entry name="!?*.flex" />
|
||||||
|
<entry name="!?*.kt" />
|
||||||
|
<entry name="!?*.clj" />
|
||||||
|
</wildcardResourcePatterns>
|
||||||
|
<bytecodeTargetLevel target="17" />
|
||||||
|
</component>
|
||||||
|
</project>
|
10
DEV4.5/Couleurs/.idea/deploymentTargetDropDown.xml
Normal file
10
DEV4.5/Couleurs/.idea/deploymentTargetDropDown.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetDropDown">
|
||||||
|
<value>
|
||||||
|
<entry key="app">
|
||||||
|
<State />
|
||||||
|
</entry>
|
||||||
|
</value>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
DEV4.5/Couleurs/.idea/encodings.xml
Normal file
6
DEV4.5/Couleurs/.idea/encodings.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding">
|
||||||
|
<file url="PROJECT" charset="UTF-8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
20
DEV4.5/Couleurs/.idea/gradle.xml
Normal file
20
DEV4.5/Couleurs/.idea/gradle.xml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||||
|
<component name="GradleSettings">
|
||||||
|
<option name="linkedExternalProjectsSettings">
|
||||||
|
<GradleProjectSettings>
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="gradleHome" value="/usr/share/java/gradle" />
|
||||||
|
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
||||||
|
<option name="modules">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
<option value="$PROJECT_DIR$/app" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
<option name="resolveExternalAnnotations" value="false" />
|
||||||
|
</GradleProjectSettings>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
40
DEV4.5/Couleurs/.idea/jarRepositories.xml
Normal file
40
DEV4.5/Couleurs/.idea/jarRepositories.xml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="BintrayJCenter" />
|
||||||
|
<option name="name" value="BintrayJCenter" />
|
||||||
|
<option name="url" value="https://jcenter.bintray.com/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Google" />
|
||||||
|
<option name="name" value="Google" />
|
||||||
|
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="/opt/sdk/extras/m2repository" />
|
||||||
|
<option name="name" value="/opt/sdk/extras/m2repository" />
|
||||||
|
<option name="url" value="file:/opt/sdk/extras/m2repository" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="/opt/sdk/extras/android/m2repository" />
|
||||||
|
<option name="name" value="/opt/sdk/extras/android/m2repository" />
|
||||||
|
<option name="url" value="file:/opt/sdk/extras/android/m2repository" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="/opt/sdk/extras/google/m2repository" />
|
||||||
|
<option name="name" value="/opt/sdk/extras/google/m2repository" />
|
||||||
|
<option name="url" value="file:/opt/sdk/extras/google/m2repository" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
10
DEV4.5/Couleurs/.idea/migrations.xml
Normal file
10
DEV4.5/Couleurs/.idea/migrations.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectMigrations">
|
||||||
|
<option name="MigrateToGradleLocalJavaHome">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
19
DEV4.5/Couleurs/.idea/misc.xml
Normal file
19
DEV4.5/Couleurs/.idea/misc.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="BuildAttributionWarningsFilter">
|
||||||
|
<option name="noGCSettingWarning" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="DesignSurface">
|
||||||
|
<option name="filePathToZoomLevelMap">
|
||||||
|
<map>
|
||||||
|
<entry key="app/src/main/res/menu/menu_liste.xml" value="0.3625" />
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectType">
|
||||||
|
<option name="id" value="Android" />
|
||||||
|
</component>
|
||||||
|
</project>
|
12
DEV4.5/Couleurs/.idea/modules.xml
Normal file
12
DEV4.5/Couleurs/.idea/modules.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/Couleurs.iml" filepath="$PROJECT_DIR$/Couleurs.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/Couleurs.app.iml" filepath="$PROJECT_DIR$/.idea/modules/app/Couleurs.app.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/Couleurs.app.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/Couleurs.app.androidTest.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/Couleurs.app.main.iml" filepath="$PROJECT_DIR$/.idea/modules/app/Couleurs.app.main.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/Couleurs.app.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/Couleurs.app.unitTest.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
DEV4.5/Couleurs/.idea/vcs.xml
Normal file
6
DEV4.5/Couleurs/.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
1
DEV4.5/Couleurs/app/.gitignore
vendored
Normal file
1
DEV4.5/Couleurs/app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/build
|
25
DEV4.5/Couleurs/app/build.gradle
Normal file
25
DEV4.5/Couleurs/app/build.gradle
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdk 33
|
||||||
|
buildToolsVersion '33.0.0'
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId "fr.iut_fbleau.apl41.couleurs"
|
||||||
|
minSdkVersion 19
|
||||||
|
targetSdk 33
|
||||||
|
versionCode 1
|
||||||
|
versionName "1.0"
|
||||||
|
}
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
testImplementation 'junit:junit:4.12'
|
||||||
|
}
|
17
DEV4.5/Couleurs/app/proguard-rules.pro
vendored
Normal file
17
DEV4.5/Couleurs/app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# By default, the flags in this file are appended to flags specified
|
||||||
|
# in /opt/android-sdk/tools/proguard/proguard-android.txt
|
||||||
|
# You can edit the include path and order by changing the proguardFiles
|
||||||
|
# directive in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# Add any project specific keep options here:
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
@ -0,0 +1,13 @@
|
|||||||
|
package fr.iut_fbleau.apl41.couleurs;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
import android.test.ApplicationTestCase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
|
||||||
|
*/
|
||||||
|
public class ApplicationTest extends ApplicationTestCase<Application> {
|
||||||
|
public ApplicationTest() {
|
||||||
|
super(Application.class);
|
||||||
|
}
|
||||||
|
}
|
18
DEV4.5/Couleurs/app/src/main/AndroidManifest.xml
Normal file
18
DEV4.5/Couleurs/app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="fr.iut_fbleau.apl41.couleurs">
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:label="@string/app_name">
|
||||||
|
<activity
|
||||||
|
android:name=".Liste"
|
||||||
|
android:exported="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
@ -0,0 +1,45 @@
|
|||||||
|
package fr.iut_fbleau.apl41.couleurs;
|
||||||
|
|
||||||
|
import android.content.ContentValues;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
|
import android.database.sqlite.SQLiteOpenHelper;
|
||||||
|
import android.provider.BaseColumns;
|
||||||
|
|
||||||
|
public class AccesBaseDeDonnees extends SQLiteOpenHelper {
|
||||||
|
public final static String NOM_BASE = "base_couleurs";
|
||||||
|
public final static int VERSION_BASE = 3;
|
||||||
|
public final static String NOM_TABLE = "couleurs";
|
||||||
|
public final static String CHAMP_NOM = "couleurs_nom";
|
||||||
|
public final static String CHAMP_VALEUR = "couleurs_valeur";
|
||||||
|
|
||||||
|
public AccesBaseDeDonnees(Context context) {
|
||||||
|
super(context, AccesBaseDeDonnees.NOM_BASE, null, AccesBaseDeDonnees.VERSION_BASE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(SQLiteDatabase baseDeDonnees) {
|
||||||
|
baseDeDonnees.execSQL("create table " + AccesBaseDeDonnees.NOM_TABLE + "(" +
|
||||||
|
BaseColumns._ID + " integer primary key autoincrement, " +
|
||||||
|
AccesBaseDeDonnees.CHAMP_NOM + " text not null, " +
|
||||||
|
AccesBaseDeDonnees.CHAMP_VALEUR + " integer);");
|
||||||
|
|
||||||
|
ContentValues tuple = new ContentValues();
|
||||||
|
|
||||||
|
tuple.put(AccesBaseDeDonnees.CHAMP_NOM, "bleu Denim");
|
||||||
|
tuple.put(AccesBaseDeDonnees.CHAMP_VALEUR, 0xFF4B0082);
|
||||||
|
baseDeDonnees.insert(AccesBaseDeDonnees.NOM_TABLE, null, tuple);
|
||||||
|
tuple.put(AccesBaseDeDonnees.CHAMP_NOM, "bleu électrique");
|
||||||
|
tuple.put(AccesBaseDeDonnees.CHAMP_VALEUR, 0xFF1163E3);
|
||||||
|
baseDeDonnees.insert(AccesBaseDeDonnees.NOM_TABLE, null, tuple);
|
||||||
|
tuple.put(AccesBaseDeDonnees.CHAMP_NOM, "bleu vert");
|
||||||
|
tuple.put(AccesBaseDeDonnees.CHAMP_VALEUR, 0xFF40E0D0);
|
||||||
|
baseDeDonnees.insert(AccesBaseDeDonnees.NOM_TABLE, null, tuple);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpgrade(SQLiteDatabase baseDeDonnees, int vieux, int nouveau) {
|
||||||
|
baseDeDonnees.execSQL("drop table if exists " + AccesBaseDeDonnees.NOM_TABLE);
|
||||||
|
this.onCreate(baseDeDonnees);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package fr.iut_fbleau.apl41.couleurs;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.AdapterView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by hernand on 3/28/17.
|
||||||
|
*/
|
||||||
|
public class ControleClic implements AdapterView.OnItemClickListener {
|
||||||
|
private Activity parent;
|
||||||
|
public ControleClic(Activity a) {
|
||||||
|
this.parent = a;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onItemClick(AdapterView<?> liste, View vue, int positionListe, long idBase) {
|
||||||
|
Toast.makeText(this.parent, "Clic sur ligne "+(positionListe+1), Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package fr.iut_fbleau.apl41.couleurs;
|
||||||
|
|
||||||
|
import android.database.Cursor;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.SimpleCursorAdapter;
|
||||||
|
|
||||||
|
public class Lieur implements SimpleCursorAdapter.ViewBinder {
|
||||||
|
@Override
|
||||||
|
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
|
||||||
|
if(view.getId() == R.id.couleur) {
|
||||||
|
view.setBackgroundColor(cursor.getInt(columnIndex));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package fr.iut_fbleau.apl41.couleurs;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.database.Cursor;
|
||||||
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.widget.ListView;
|
||||||
|
import android.widget.SimpleCursorAdapter;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
public class Liste extends Activity {
|
||||||
|
private final static String[] CHAMPS = {AccesBaseDeDonnees.CHAMP_NOM, AccesBaseDeDonnees.CHAMP_VALEUR};
|
||||||
|
private final static int[] VUES = {R.id.nom, R.id.couleur};
|
||||||
|
private SimpleCursorAdapter adaptateur;
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
this.setContentView(R.layout.activity_liste);
|
||||||
|
|
||||||
|
this.adaptateur = new SimpleCursorAdapter(this, R.layout.row_element, null, Liste.CHAMPS, Liste.VUES, 0);
|
||||||
|
this.adaptateur.setViewBinder(new Lieur());
|
||||||
|
ListView elements = (ListView) this.findViewById(R.id.elements);
|
||||||
|
elements.setOnItemClickListener(new ControleClic(this));
|
||||||
|
elements.setAdapter(this.adaptateur);
|
||||||
|
this.remplirListe();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void remplirListe() {
|
||||||
|
AccesBaseDeDonnees acces = new AccesBaseDeDonnees(this);
|
||||||
|
SQLiteDatabase baseDeDonnees = acces.getReadableDatabase();
|
||||||
|
|
||||||
|
Cursor curseur = baseDeDonnees.query(AccesBaseDeDonnees.NOM_TABLE, null, null, null, null, null, null);
|
||||||
|
if (curseur != null) {
|
||||||
|
this.adaptateur.swapCursor(curseur);
|
||||||
|
} else {
|
||||||
|
Toast.makeText(this, "Erreur d'accès à la base de données", Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
this.getMenuInflater().inflate(R.menu.menu_liste, menu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
int id = item.getItemId();
|
||||||
|
|
||||||
|
if (id == R.id.action_ajouter) {
|
||||||
|
// TODO
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
}
|
18
DEV4.5/Couleurs/app/src/main/res/layout/activity_liste.xml
Normal file
18
DEV4.5/Couleurs/app/src/main/res/layout/activity_liste.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context=".Liste"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||||
|
android:layout_marginRight="@dimen/activity_horizontal_margin"
|
||||||
|
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||||
|
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
||||||
|
>
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/elements"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
25
DEV4.5/Couleurs/app/src/main/res/layout/row_element.xml
Normal file
25
DEV4.5/Couleurs/app/src/main/res/layout/row_element.xml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="@dimen/color_size"
|
||||||
|
android:layout_height="@dimen/color_size"
|
||||||
|
android:id="@+id/couleur"
|
||||||
|
android:layout_margin="@dimen/color_margin"
|
||||||
|
android:background="#ff20a080"
|
||||||
|
android:gravity="center" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:text="Vert"
|
||||||
|
android:id="@+id/nom"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:gravity="center_vertical|start" />
|
||||||
|
</LinearLayout>
|
13
DEV4.5/Couleurs/app/src/main/res/menu/menu_liste.xml
Normal file
13
DEV4.5/Couleurs/app/src/main/res/menu/menu_liste.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<menu
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:context=".Liste"
|
||||||
|
>
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_ajouter"
|
||||||
|
android:title="@string/action_ajouter"
|
||||||
|
android:orderInCategory="100"
|
||||||
|
android:showAsAction="never"
|
||||||
|
/>
|
||||||
|
</menu>
|
BIN
DEV4.5/Couleurs/app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
DEV4.5/Couleurs/app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
BIN
DEV4.5/Couleurs/app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
DEV4.5/Couleurs/app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
DEV4.5/Couleurs/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
DEV4.5/Couleurs/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
BIN
DEV4.5/Couleurs/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
DEV4.5/Couleurs/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
BIN
DEV4.5/Couleurs/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
DEV4.5/Couleurs/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
@ -0,0 +1,5 @@
|
|||||||
|
<resources>
|
||||||
|
<dimen name="activity_horizontal_margin">
|
||||||
|
64dp
|
||||||
|
</dimen>
|
||||||
|
</resources>
|
14
DEV4.5/Couleurs/app/src/main/res/values/dimens.xml
Normal file
14
DEV4.5/Couleurs/app/src/main/res/values/dimens.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<resources>
|
||||||
|
<dimen name="activity_horizontal_margin">
|
||||||
|
16dp
|
||||||
|
</dimen>
|
||||||
|
<dimen name="activity_vertical_margin">
|
||||||
|
16dp
|
||||||
|
</dimen>
|
||||||
|
<dimen name="color_size">
|
||||||
|
32dp
|
||||||
|
</dimen>
|
||||||
|
<dimen name="color_margin">
|
||||||
|
12dp
|
||||||
|
</dimen>
|
||||||
|
</resources>
|
8
DEV4.5/Couleurs/app/src/main/res/values/strings.xml
Normal file
8
DEV4.5/Couleurs/app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<resources>
|
||||||
|
<string name="app_name">
|
||||||
|
Couleurs
|
||||||
|
</string>
|
||||||
|
<string name="action_ajouter">
|
||||||
|
Ajouter
|
||||||
|
</string>
|
||||||
|
</resources>
|
@ -0,0 +1,15 @@
|
|||||||
|
package fr.iut_fbleau.apl41.couleurs;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To work on unit tests, switch the Test Artifact in the Build Variants view.
|
||||||
|
*/
|
||||||
|
public class ExampleUnitTest {
|
||||||
|
@Test
|
||||||
|
public void addition_isCorrect() throws Exception {
|
||||||
|
assertEquals(4, 2 + 2);
|
||||||
|
}
|
||||||
|
}
|
25
DEV4.5/Couleurs/build.gradle
Normal file
25
DEV4.5/Couleurs/build.gradle
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.android.tools.build:gradle:7.2.2'
|
||||||
|
|
||||||
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
// in the individual module build.gradle files
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task clean(type: Delete) {
|
||||||
|
delete rootProject.buildDir
|
||||||
|
}
|
18
DEV4.5/Couleurs/gradle.properties
Normal file
18
DEV4.5/Couleurs/gradle.properties
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Project-wide Gradle settings.
|
||||||
|
|
||||||
|
# IDE (e.g. Android Studio) users:
|
||||||
|
# Gradle settings configured through the IDE *will override*
|
||||||
|
# any settings specified in this file.
|
||||||
|
|
||||||
|
# For more details on how to configure your build environment visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
|
||||||
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
||||||
|
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||||
|
|
||||||
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
|
# org.gradle.parallel=true
|
BIN
DEV4.5/Couleurs/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
DEV4.5/Couleurs/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
6
DEV4.5/Couleurs/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
DEV4.5/Couleurs/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#Wed Mar 23 13:29:16 CET 2022
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
160
DEV4.5/Couleurs/gradlew
vendored
Normal file
160
DEV4.5/Couleurs/gradlew
vendored
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##
|
||||||
|
## Gradle start up script for UN*X
|
||||||
|
##
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn ( ) {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die ( ) {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="java"
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=$((i+1))
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
(0) set -- ;;
|
||||||
|
(1) set -- "$args0" ;;
|
||||||
|
(2) set -- "$args0" "$args1" ;;
|
||||||
|
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||||
|
function splitJvmOpts() {
|
||||||
|
JVM_OPTS=("$@")
|
||||||
|
}
|
||||||
|
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||||
|
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||||
|
|
||||||
|
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
90
DEV4.5/Couleurs/gradlew.bat
vendored
Normal file
90
DEV4.5/Couleurs/gradlew.bat
vendored
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:init
|
||||||
|
@rem Get command-line arguments, handling Windowz variants
|
||||||
|
|
||||||
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
|
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||||
|
|
||||||
|
:win9xME_args
|
||||||
|
@rem Slurp the command line arguments.
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
set _SKIP=2
|
||||||
|
|
||||||
|
:win9xME_args_slurp
|
||||||
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
|
set CMD_LINE_ARGS=%*
|
||||||
|
goto execute
|
||||||
|
|
||||||
|
:4NT_args
|
||||||
|
@rem Get arguments from the 4NT Shell from JP Software
|
||||||
|
set CMD_LINE_ARGS=%$
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
1
DEV4.5/Couleurs/settings.gradle
Normal file
1
DEV4.5/Couleurs/settings.gradle
Normal file
@ -0,0 +1 @@
|
|||||||
|
include ':app'
|
15
DEV4.5/Reticule/.gitignore
vendored
Normal file
15
DEV4.5/Reticule/.gitignore
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
*.iml
|
||||||
|
.gradle
|
||||||
|
/local.properties
|
||||||
|
/.idea/caches
|
||||||
|
/.idea/libraries
|
||||||
|
/.idea/modules.xml
|
||||||
|
/.idea/workspace.xml
|
||||||
|
/.idea/navEditor.xml
|
||||||
|
/.idea/assetWizardSettings.xml
|
||||||
|
.DS_Store
|
||||||
|
/build
|
||||||
|
/captures
|
||||||
|
.externalNativeBuild
|
||||||
|
.cxx
|
||||||
|
local.properties
|
3
DEV4.5/Reticule/.idea/.gitignore
vendored
Normal file
3
DEV4.5/Reticule/.idea/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
1
DEV4.5/Reticule/.idea/.name
Normal file
1
DEV4.5/Reticule/.idea/.name
Normal file
@ -0,0 +1 @@
|
|||||||
|
reticule
|
6
DEV4.5/Reticule/.idea/compiler.xml
Normal file
6
DEV4.5/Reticule/.idea/compiler.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel target="17" />
|
||||||
|
</component>
|
||||||
|
</project>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user