diff --git a/Td2NotesEtu/Td2NotesEtu/.gitignore b/Td2NotesEtu/Td2NotesEtu/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..aa724b77071afcbd9bb398053e05adaf7ac9405a --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/.gitignore @@ -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 diff --git a/Td2NotesEtu/Td2NotesEtu/.idea/.gitignore b/Td2NotesEtu/Td2NotesEtu/.idea/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Td2NotesEtu/Td2NotesEtu/.idea/.name b/Td2NotesEtu/Td2NotesEtu/.idea/.name new file mode 100644 index 0000000000000000000000000000000000000000..44bba2aa96b6285aadfc150cfe5699b3ddaa4f91 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/.idea/.name @@ -0,0 +1 @@ +Td2Notes \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/.idea/compiler.xml b/Td2NotesEtu/Td2NotesEtu/.idea/compiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..b86273d9424b73937ca6ad7933f6b7eeb60f4a3d --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/.idea/compiler.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <bytecodeTargetLevel target="21" /> + </component> +</project> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/.idea/deploymentTargetSelector.xml b/Td2NotesEtu/Td2NotesEtu/.idea/deploymentTargetSelector.xml new file mode 100644 index 0000000000000000000000000000000000000000..fc8303f95a4e6eddc77d030af2844e2440e1493a --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/.idea/deploymentTargetSelector.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="deploymentTargetSelector"> + <selectionStates> + <SelectionState runConfigName="app"> + <option name="selectionMode" value="DROPDOWN" /> + </SelectionState> + <SelectionState runConfigName="MainActivity"> + <option name="selectionMode" value="DROPDOWN" /> + </SelectionState> + </selectionStates> + </component> +</project> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/.idea/gradle.xml b/Td2NotesEtu/Td2NotesEtu/.idea/gradle.xml new file mode 100644 index 0000000000000000000000000000000000000000..7b3006b6ee03430a07b5c217a8e9f2ad8c7bdaf5 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/.idea/gradle.xml @@ -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="testRunner" value="CHOOSE_PER_TEST" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <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> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/.idea/kotlinc.xml b/Td2NotesEtu/Td2NotesEtu/.idea/kotlinc.xml new file mode 100644 index 0000000000000000000000000000000000000000..69e86158baa3715bcfdcf3f1b8027dbf943c24d1 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/.idea/kotlinc.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="KotlinJpsPluginSettings"> + <option name="version" value="1.8.20" /> + </component> +</project> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/.idea/migrations.xml b/Td2NotesEtu/Td2NotesEtu/.idea/migrations.xml new file mode 100644 index 0000000000000000000000000000000000000000..f8051a6f973e69a86e6f07f1a1c87f17a31c7235 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/.idea/migrations.xml @@ -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> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/.idea/misc.xml b/Td2NotesEtu/Td2NotesEtu/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..74dd639e4ea4800753c1dbdb333093410e843492 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/.idea/misc.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ExternalStorageConfigurationManager" enabled="true" /> + <component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/.idea/runConfigurations.xml b/Td2NotesEtu/Td2NotesEtu/.idea/runConfigurations.xml new file mode 100644 index 0000000000000000000000000000000000000000..16660f1d80a1f5cde389ecce783051eb8f68223d --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/.idea/runConfigurations.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RunConfigurationProducerService"> + <option name="ignoredProducers"> + <set> + <option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" /> + <option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" /> + <option value="com.intellij.execution.junit.PatternConfigurationProducer" /> + <option value="com.intellij.execution.junit.TestInClassConfigurationProducer" /> + <option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" /> + <option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" /> + <option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" /> + <option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" /> + </set> + </option> + </component> +</project> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/.idea/vcs.xml b/Td2NotesEtu/Td2NotesEtu/.idea/vcs.xml new file mode 100644 index 0000000000000000000000000000000000000000..b2bdec2d71b6a5ce4ae49efc37516809c50e4d5e --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/.idea/vcs.xml @@ -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> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/.gitignore b/Td2NotesEtu/Td2NotesEtu/app/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..42afabfd2abebf31384ca7797186a27a4b7dbee8 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/build.gradle b/Td2NotesEtu/Td2NotesEtu/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..258df9e41cd3ddd563eed458fe13e27240287bab --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/build.gradle @@ -0,0 +1,45 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + namespace 'dev.mobile.td2notes' + compileSdk 33 + + defaultConfig { + applicationId "dev.mobile.td2notes" + minSdk 33 + targetSdk 33 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } +} + +dependencies { + + implementation 'androidx.core:core-ktx:1.8.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.5.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'androidx.activity:activity-ktx:1.6.1' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' +} \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/proguard-rules.pro b/Td2NotesEtu/Td2NotesEtu/app/proguard-rules.pro new file mode 100644 index 0000000000000000000000000000000000000000..481bb434814107eb79d7a30b676d344b0df2f8ce --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# 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 *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/androidTest/java/dev/mobile/td2notes/ExampleInstrumentedTest.kt b/Td2NotesEtu/Td2NotesEtu/app/src/androidTest/java/dev/mobile/td2notes/ExampleInstrumentedTest.kt new file mode 100644 index 0000000000000000000000000000000000000000..67c80181fad1432f2527dfc9f3e14e6c0eabc7d2 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/androidTest/java/dev/mobile/td2notes/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package dev.mobile.td2notes + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("dev.mobile.td2notes", appContext.packageName) + } +} \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/AndroidManifest.xml b/Td2NotesEtu/Td2NotesEtu/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..51c2083a3b0d0d4cd8fa02a3b34aa78fb50e843f --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools"> + + <application + android:allowBackup="true" + android:dataExtractionRules="@xml/data_extraction_rules" + android:fullBackupContent="@xml/backup_rules" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/Theme.Td2Notes" + tools:targetApi="31"> + <activity + android:name=".MainActivity" + android:exported="true"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/java/dev/mobile/td2notes/MainActivity.kt b/Td2NotesEtu/Td2NotesEtu/app/src/main/java/dev/mobile/td2notes/MainActivity.kt new file mode 100644 index 0000000000000000000000000000000000000000..6359355e8c0933609c180addd4b45d1d34a38581 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/java/dev/mobile/td2notes/MainActivity.kt @@ -0,0 +1,48 @@ +package dev.mobile.td2notes + +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import android.widget.Button +import android.widget.ImageButton +import android.widget.RatingBar +import android.widget.TextView +import androidx.activity.viewModels + +class MainActivity : AppCompatActivity() { + //private lateinit var notes: Notes + val notes : NoteViewModel by viewModels() + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + //this.notes = Notes.init() + val notes : NoteViewModel by viewModels() + + val notePrec: ImageButton = findViewById(R.id.recule) + val noteSuiv: ImageButton = findViewById(R.id.avance) + val supp: ImageButton = findViewById(R.id.supprime) + val prof: TextView = findViewById(R.id.nom) + val ratingBar : RatingBar = findViewById(R.id.note) + + prof.setText(this.notes.notes.courante()!!.nom) + ratingBar.rating = (this.notes.notes.courante()!!.note).toFloat() + notePrec.setOnClickListener() { + this.notes.notes.precedente() + prof.setText(this.notes.notes.courante()!!.nom) + ratingBar.rating = (this.notes.notes.courante()!!.note).toFloat() + + } + noteSuiv.setOnClickListener() { + this.notes.notes.suivante() + prof.setText(this.notes.notes.courante()!!.nom) + ratingBar.rating = (this.notes.notes.courante()!!.note).toFloat() + + } + + supp.setOnClickListener(){ + this.notes.notes.supprimer() + } + + } +} \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/java/dev/mobile/td2notes/Note.kt b/Td2NotesEtu/Td2NotesEtu/app/src/main/java/dev/mobile/td2notes/Note.kt new file mode 100644 index 0000000000000000000000000000000000000000..98bcfaa7b6e2701aff71b734ae473f12baf18be1 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/java/dev/mobile/td2notes/Note.kt @@ -0,0 +1,54 @@ +package dev.mobile.td2notes + +import android.os.Parcelable +import android.os.Parcel + +class Note(var nom: String?, var note: Double, var commentaire: String?) : Parcelable{ + + + override fun toString(): String { + return "Note{" + + "nom='" + nom + '\'' + + ", note=" + note + + ", commentaire='" + commentaire + '\'' + + '}' + } + + + + + constructor(parcel: Parcel) : this( + parcel.readString(), + parcel.readDouble(), + parcel.readString() + ) { + } + + init { + require(!(note < 0 || note > NOTE_MAX)) { "Illegal note: $note" } + } + + override fun writeToParcel(parcel: Parcel, flags: Int) { + parcel.writeString(nom) + parcel.writeDouble(note) + parcel.writeString(commentaire) + } + + override fun describeContents(): Int { + return 0 + } + + companion object CREATOR : Parcelable.Creator<Note> { + override fun createFromParcel(parcel: Parcel): Note { + return Note(parcel) + } + + override fun newArray(size: Int): Array<Note?> { + return arrayOfNulls(size) + } + + const val NOTE_MAX = 5.0 + + val FAKE_NOTE = Note("", 0.0, "") + } +} diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/java/dev/mobile/td2notes/NoteViewModel.kt b/Td2NotesEtu/Td2NotesEtu/app/src/main/java/dev/mobile/td2notes/NoteViewModel.kt new file mode 100644 index 0000000000000000000000000000000000000000..163aaa4029b508a8b300cb0fa0dc4a248a13848c --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/java/dev/mobile/td2notes/NoteViewModel.kt @@ -0,0 +1,6 @@ +package dev.mobile.td2notes + +class NoteViewModel() : androidx.lifecycle.ViewModel() { + + var notes : Notes = Notes.init() +} \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/java/dev/mobile/td2notes/Notes.kt b/Td2NotesEtu/Td2NotesEtu/app/src/main/java/dev/mobile/td2notes/Notes.kt new file mode 100644 index 0000000000000000000000000000000000000000..5dd69fac5d6ed578cef62bcf1c1672efc4f0925e --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/java/dev/mobile/td2notes/Notes.kt @@ -0,0 +1,48 @@ +package dev.mobile.td2notes + +class Notes(private val notes: MutableList<Note> = mutableListOf(), + private var cursor: Int = -1) { + + fun ajouter(n: Note) { + notes.add(n) + cursor = notes.size - 1 + } + + fun supprimer() { + if (!estVide()) { + notes.removeAt(cursor) + if (!notes.isEmpty()) cursor = cursor % notes.size + } + } + + fun suivante(): Note? { + if (estVide()) return null + cursor = (cursor + 1) % notes.size + return notes[cursor] + } + + fun courante(): Note? { + return if (estVide()) null else notes[cursor] + } + + fun precedente(): Note? { + if (estVide()) return null + cursor = (cursor - 1 + notes.size) % notes.size + return notes[cursor] + } + + fun estVide(): Boolean { + return notes.isEmpty() + } + + companion object { + fun init(): Notes { + val n = Notes() + n.ajouter(Note("Remm", 2.5, "Peut mieux faire...")) + n.ajouter(Note("Berdjugin", 5.0, "Le meilleur !")) + n.ajouter(Note("Lanoix", 4.5, "Super !")) + return n + } + } + +} \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b068d11462a4b96669193de13a711a3a36220a0 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/drawable/ic_launcher_background.xml b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000000000000000000000000000000000000..07d5da9cbf141911847041df5d7b87f0dd5ef9d4 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/layout/activity_main.xml b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000000000000000000000000000000000000..8874cf5f83a06cf8db226a79f1583a043518f4ad --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout 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" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity"> + + <TextView + android:id="@+id/nom" + android:layout_width="0dp" + android:layout_height="41dp" + android:layout_marginEnd="8dp" + android:layout_marginStart="8dp" + android:ems="10" + android:inputType="textPersonName" + android:textSize="18sp" + android:visibility="visible" + app:layout_constraintBottom_toTopOf="@+id/recule" + app:layout_constraintEnd_toStartOf="@+id/note" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <RatingBar + android:id="@+id/note" + style="?attr/ratingBarStyleIndicator" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="4dp" + android:visibility="visible" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="@+id/nom" /> + + + <ImageButton + android:id="@+id/recule" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@android:drawable/ic_media_previous" + app:layout_constraintBottom_toTopOf="@+id/guideline" + app:layout_constraintEnd_toStartOf="@+id/ajoute" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/nom" /> + + <ImageButton + android:id="@+id/avance" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@android:drawable/ic_media_next" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@+id/detail" + app:layout_constraintTop_toTopOf="@+id/ajoute" /> + + <ImageButton + android:id="@+id/ajoute" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintEnd_toStartOf="@+id/supprime" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@+id/recule" + app:layout_constraintTop_toTopOf="@+id/recule" + app:srcCompat="@android:drawable/ic_input_add" /> + + <ImageButton + android:id="@+id/detail" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintBottom_toBottomOf="@+id/avance" + app:layout_constraintEnd_toStartOf="@+id/avance" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@+id/supprime" + app:layout_constraintTop_toTopOf="@+id/avance" + app:srcCompat="@android:drawable/ic_media_play" /> + + <ImageButton + android:id="@+id/supprime" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintBottom_toBottomOf="@+id/avance" + app:layout_constraintEnd_toStartOf="@+id/detail" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@+id/ajoute" + app:layout_constraintTop_toTopOf="@+id/avance" + app:srcCompat="@android:drawable/ic_delete" /> + + <androidx.constraintlayout.widget.Guideline + android:id="@+id/guideline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + app:layout_constraintGuide_percent="0.5" /> + + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000000000000000000000000000000000000..6f3b755bf50c6b03d8714a9c6184705e6a08389f --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> + <monochrome android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000000000000000000000000000000000000..6f3b755bf50c6b03d8714a9c6184705e6a08389f --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> + <monochrome android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..c209e78ecd372343283f4157dcfd918ec5165bb3 Binary files /dev/null and b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..b2dfe3d1ba5cf3ee31b3ecc1ced89044a1f3b7a9 Binary files /dev/null and b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..4f0f1d64e58ba64d180ce43ee13bf9a17835fbca Binary files /dev/null and b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..62b611da081676d42f6c3f78a2c91e7bcedddedb Binary files /dev/null and b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..948a3070fe34c611c42c0d3ad3013a0dce358be0 Binary files /dev/null and b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..1b9a6956b3acdc11f40ce2bb3f6efbd845cc243f Binary files /dev/null and b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..28d4b77f9f036a47549d47db79c16788749dca10 Binary files /dev/null and b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..9287f5083623b375139afb391af71cc533a7dd37 Binary files /dev/null and b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000000000000000000000000000000000000..aa7d6427e6fa1074b79ccd52ef67ac15c5637e85 Binary files /dev/null and b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000000000000000000000000000000000000..9126ae37cbc3587421d6889eadd1d91fbf1994d4 Binary files /dev/null and b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/values-night/themes.xml b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..356b203cc3f5ecd0fb5b9c3fde26f3c4ac54df26 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/values-night/themes.xml @@ -0,0 +1,7 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Base.Theme.Td2Notes" parent="Theme.Material3.DayNight.NoActionBar"> + <!-- Customize your dark theme here. --> + <!-- <item name="colorPrimary">@color/my_dark_primary</item> --> + </style> +</resources> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/values/colors.xml b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/values/colors.xml new file mode 100644 index 0000000000000000000000000000000000000000..b77215df13f94d824bafc13a18bb3ed991e90858 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> + <color name="rating">#29A0B1</color> +</resources> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/values/strings.xml b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000000000000000000000000000000000..5b0cb914367f8d3eec53e6284691dcce4a7e4dac --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ +<resources> + <string name="app_name">Td2Notes</string> +</resources> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/values/themes.xml b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/values/themes.xml new file mode 100644 index 0000000000000000000000000000000000000000..179a95c3e8f52e3fadf27afea2f6a541d223bb97 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/values/themes.xml @@ -0,0 +1,12 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Base.Theme.Td2Notes" parent="Theme.Material3.DayNight.NoActionBar"> + <!-- Customize your light theme here. --> + <!-- <item name="colorPrimary">@color/my_light_primary</item> --> + <item name="colorControlActivated">@color/rating</item> + </style> + + <style name="Theme.Td2Notes" parent="Base.Theme.Td2Notes" /> + + +</resources> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/xml/backup_rules.xml b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/xml/backup_rules.xml new file mode 100644 index 0000000000000000000000000000000000000000..fa0f996d2c2a6bdd11f5371de4268c8389d6c720 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/xml/backup_rules.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Sample backup rules file; uncomment and customize as necessary. + See https://developer.android.com/guide/topics/data/autobackup + for details. + Note: This file is ignored for devices older that API 31 + See https://developer.android.com/about/versions/12/backup-restore +--> +<full-backup-content> + <!-- + <include domain="sharedpref" path="."/> + <exclude domain="sharedpref" path="device.xml"/> +--> +</full-backup-content> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/main/res/xml/data_extraction_rules.xml b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 0000000000000000000000000000000000000000..9ee9997b0b4726e57c27b2f7b21462b604ff8a88 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Sample data extraction rules file; uncomment and customize as necessary. + See https://developer.android.com/about/versions/12/backup-restore#xml-changes + for details. +--> +<data-extraction-rules> + <cloud-backup> + <!-- TODO: Use <include> and <exclude> to control what is backed up. + <include .../> + <exclude .../> + --> + </cloud-backup> + <!-- + <device-transfer> + <include .../> + <exclude .../> + </device-transfer> + --> +</data-extraction-rules> \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/app/src/test/java/dev/mobile/td2notes/ExampleUnitTest.kt b/Td2NotesEtu/Td2NotesEtu/app/src/test/java/dev/mobile/td2notes/ExampleUnitTest.kt new file mode 100644 index 0000000000000000000000000000000000000000..454d3ccecd7475f29f931f14dae0d62aa0644d5d --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/app/src/test/java/dev/mobile/td2notes/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package dev.mobile.td2notes + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/build.gradle b/Td2NotesEtu/Td2NotesEtu/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..d19ee2396532e7276a9bc8c197b60ccc7dde21bb --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/build.gradle @@ -0,0 +1,6 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +plugins { + id 'com.android.application' version '8.8.0' apply false + id 'com.android.library' version '8.8.0' apply false + id 'org.jetbrains.kotlin.android' version '1.8.20' apply false +} \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/gradle.properties b/Td2NotesEtu/Td2NotesEtu/gradle.properties new file mode 100644 index 0000000000000000000000000000000000000000..3c5031eb7d63f785752b1914cc8692a453d1cc63 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/gradle.properties @@ -0,0 +1,23 @@ +# 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. +org.gradle.jvmargs=-Xmx2048m -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 +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Kotlin code style for this project: "official" or "obsolete": +kotlin.code.style=official +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/Td2NotesEtu/Td2NotesEtu/gradle/wrapper/gradle-wrapper.jar b/Td2NotesEtu/Td2NotesEtu/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..2c3521197d7c4586c843d1d3e9090525f1898cde Binary files /dev/null and b/Td2NotesEtu/Td2NotesEtu/gradle/wrapper/gradle-wrapper.jar differ diff --git a/Td2NotesEtu/Td2NotesEtu/gradle/wrapper/gradle-wrapper.properties b/Td2NotesEtu/Td2NotesEtu/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..df97d72b8b91fa0e088ae27b1c84a6063481fe22 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/Td2NotesEtu/Td2NotesEtu/gradlew b/Td2NotesEtu/Td2NotesEtu/gradlew new file mode 100644 index 0000000000000000000000000000000000000000..f5feea6d6b116baaca5a2642d4d9fa1f47d574a7 --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/gradlew @@ -0,0 +1,252 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# 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 +# +# https://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. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +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 + if ! command -v java >/dev/null 2>&1 + then + 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 +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/Td2NotesEtu/Td2NotesEtu/gradlew.bat b/Td2NotesEtu/Td2NotesEtu/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..9d21a21834d5195c278ba17baec3115b2aaab06e --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@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 + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@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="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +: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 %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 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! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/Td2NotesEtu/Td2NotesEtu/settings.gradle b/Td2NotesEtu/Td2NotesEtu/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..5c8186afcbde1faecf2b9c4f5ccee9d5227cc2ae --- /dev/null +++ b/Td2NotesEtu/Td2NotesEtu/settings.gradle @@ -0,0 +1,16 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} +rootProject.name = "Td2Notes" +include ':app'